ConcurrentSim.jl icon indicating copy to clipboard operation
ConcurrentSim.jl copied to clipboard

TODO: Transparent statistics gathering for resources

Open hdavid16 opened this issue 3 years ago • 1 comments

I decided to open this issue to document the TODO item on the README.

Resource statistics of interest (please edit this list as deemed pertinent):

  • [ ] utilization: number of busy servers / total servers in each resource
  • [ ] put queue length: number of items in put queue
  • [ ] get queue length: number of items in get queue

hdavid16 avatar Jul 13 '22 15:07 hdavid16

@hdavid16 @BenLauwens , over the next few weeks I will start working on a version of this. I wanted to give you a heads up in case you would like to veto / modify the approach I will be taking.

I plan to create a resource type that wraps the current resource type and logs all requests to the resource. Then I plan to add some DataFrames helpers that can extract that log and post process it in various ways, giving the results in the form of a DataFrame. This would require a DataFrames weak dependency (done with Requires.jl for Julia pre-1.9 and using the new package extension functionality in Julia 1.9+).

Additions to the public API will be kept minimal so that we can modify things in the future without breaking releases. In particular, I plan to add one new public type for the resource and one new helper function for the conversion to DataFrames.

Additionally, @BenLauwens , please let me know if you prefer that this functionality is just a completely separate library.

Lastly, I know everyone is very busy so I will interpret silence as tacit approval. Of course, if it becomes necessary, feel free to block things with messages as vague as "please do not merge, I have feedback/critique, but I will need a few weeks to find the free time to write it down".

Krastanov avatar Jul 25 '23 03:07 Krastanov