Closed ayrat555 closed 4 years ago
A high level one, average time is usually not as useful as the P90 or P99. You can still have a very bad service that half of user get super high speed and another half get super slow while the average looks good.
I would recommend to implement P50 (your average), P90 and P99 for easier use.
A high level one, average time is usually not as useful as the P90 or P99. You can still have a very bad service that half of user get super high speed and another half get super slow while the average looks good.
I would recommend to implement P50 (your average), P90 and P99 for easier use.
I started using histogrex
(the same library used in Chaperon) to aggregate metrics. You can check examples in the PR's description
{:percentile, 90.0} => 89599,
curious what is the unit?? I guess ms
but that is still like 85 seconds......🤔 is it really correct? Every value looks so large 😬
yeah, great work on the examples! now we need to know what they mean :D we need a legend :D
@boolafish values are in microseconds. I can change it to milliseconds @InoMurko it collects request metrics to Childchain and Watcherinfo apis. it has separate metrics for successful and failing requests
This PR adds aggregation of http request metrics to watcher info and childchain, using
histogrex
(it's also used in chaperon) The following metrics are collected:percentile 99
It uses separate keys for failed and successful requests. It also collection overall execution time for a test.
I can add additional metrics if they're needed
Examples:
%{ "Childchain.submit_success" => %{ :max => 296959, :mean => 30582.14, :min => 1576, :total_count => 2000, {:percentile, 10.0} => 2223, {:percentile, 20.0} => 3055, {:percentile, 30.0} => 4479, {:percentile, 40.0} => 6495, {:percentile, 50.0} => 8767, {:percentile, 60.0} => 15231, {:percentile, 75.0} => 40959, {:percentile, 80.0} => 51711, {:percentile, 85.0} => 66559, {:percentile, 90.0} => 89599, {:percentile, 95.0} => 120319, {:percentile, 99.0} => 234495, {:percentile, 99.9} => 284671, {:percentile, 99.99} => 296959, {:percentile, 99.999} => 296959 }, "WatcherInfo.get_balances_failure" => %{ :max => 1036287, :mean => 556976.4033613446, :min => 144384, :total_count => 238, {:percentile, 10.0} => 333823, {:percentile, 20.0} => 382975, {:percentile, 30.0} => 434175, {:percentile, 40.0} => 483327, {:percentile, 50.0} => 528383, {:percentile, 60.0} => 606207, {:percentile, 75.0} => 712703, {:percentile, 80.0} => 741375, {:percentile, 85.0} => 765951, {:percentile, 90.0} => 786431, {:percentile, 95.0} => 864255, {:percentile, 99.0} => 942079, {:percentile, 99.9} => 1036287, {:percentile, 99.99} => 1036287, {:percentile, 99.999} => 1036287 }, "WatcherInfo.get_balances_success" => %{ :max => 1359871, :mean => 57645.05105065543, :min => 1288, :total_count => 15181, {:percentile, 10.0} => 2527, {:percentile, 20.0} => 4095, {:percentile, 30.0} => 6367, {:percentile, 40.0} => 9087, {:percentile, 50.0} => 13119, {:percentile, 60.0} => 20095, {:percentile, 75.0} => 51199, {:percentile, 80.0} => 81407, {:percentile, 85.0} => 115199, {:percentile, 90.0} => 177151, {:percentile, 95.0} => 294911, {:percentile, 99.0} => 462847, {:percentile, 99.9} => 987135, {:percentile, 99.99} => 1277951, {:percentile, 99.999} => 1359871 }, "WatcherInfo.get_utxos_failure" => %{ :max => 1064959, :mean => 552673.6842105263, :min => 141312, :total_count => 304, {:percentile, 10.0} => 301055, {:percentile, 20.0} => 387071, {:percentile, 30.0} => 440319, {:percentile, 40.0} => 485375, {:percentile, 50.0} => 532479, {:percentile, 60.0} => 598015, {:percentile, 75.0} => 704511, {:percentile, 80.0} => 733183, {:percentile, 85.0} => 757759, {:percentile, 90.0} => 782335, {:percentile, 95.0} => 856063, {:percentile, 99.0} => 1032191, {:percentile, 99.9} => 1064959, {:percentile, 99.99} => 1064959, {:percentile, 99.999} => 1064959 }, "WatcherInfo.get_utxos_success" => %{ :max => 1359871, :mean => 87400.3442185938, :min => 1512, :total_count => 12004, {:percentile, 10.0} => 4543, {:percentile, 20.0} => 8447, {:percentile, 30.0} => 13631, {:percentile, 40.0} => 20479, {:percentile, 50.0} => 33279, {:percentile, 60.0} => 55551, {:percentile, 75.0} => 107007, {:percentile, 80.0} => 134143, {:percentile, 85.0} => 183295, {:percentile, 90.0} => 272383, {:percentile, 95.0} => 362495, {:percentile, 99.0} => 514047, {:percentile, 99.9} => 950271, {:percentile, 99.99} => 1269759, {:percentile, 99.999} => 1359871 }, "test_success" => %{ :max => 31064063, :mean => 24122097.664, :min => 17694720, :total_count => 1000, {:percentile, 10.0} => 20709375, {:percentile, 20.0} => 21495807, {:percentile, 30.0} => 22544383, {:percentile, 40.0} => 23199743, {:percentile, 50.0} => 24117247, {:percentile, 60.0} => 24772607, {:percentile, 75.0} => 26345471, {:percentile, 80.0} => 27000831, {:percentile, 85.0} => 27394047, {:percentile, 90.0} => 28180479, {:percentile, 95.0} => 28966911, {:percentile, 99.0} => 30015487, {:percentile, 99.9} => 30932991, {:percentile, 99.99} => 31064063, {:percentile, 99.999} => 31064063 } }
I created a separate module to collect metrics. It's possible to use
Chaperon.Session
to do but it has to be passed to every function and returned from it wherever it's used, which will add complexity to the project. Also, it'll require re-writing most of the code in the perf project.