could you explain how max duration timer works?

80 views
Skip to first unread message

Julien

unread,
Jan 29, 2016, 6:03:05 AM1/29/16
to metrics-user
Hi,

I try to visualize timers data for a method of my webservice and I think I have an issue with the max duration metric

I checked today at 08:41am and 10:41am and here is the data:

2016-01-29 08:41

"count": 10,
"duration_units": "seconds",
"m15_rate": 3.888425254608871e-30,
"m1_rate": 2.964393875e-314,
"m5_rate": 1.124476354126395e-83,
"max": 680.4949169700001,
"mean": 0.3428118936571908,
"mean_rate": 0.00015511794810711154,
"min": 0.21089210300000003,
"p50": 0.338775478,
"p75": 0.338775478,
"p95": 0.338775478,
"p98": 1.386537748,
"p99": 1.386537748,
"p999": 1.386537748,
"rate_units": "calls/second",
"stddev": 0.22965722710514833

2016-01-29 10:41

"count": 33,
"duration_units": "seconds",
"m15_rate": 0.003438120110888214,
"m1_rate": 0.0005831676984935531,
"m5_rate": 0.00411666510670751,
"max": 9.790024147,
"mean": 3.1376795612134267,
"mean_rate": 0.0004607538746913076,
"min": 0.338775478,
"p50": 2.012370043,
"p75": 5.8302808100000005,
"p95": 5.8302808100000005,
"p98": 5.8302808100000005,
"p99": 5.8302808100000005,
"p999": 5.8302808100000005,
"rate_units": "calls/second",
"stddev": 1.9990051519530043

the max is 680 seconds à 08:41 and is 9 seconds at 10:41

I didn't reboot my server or app or anything and the counter continues to increase
I don"t understand why this metric decreased

thank you

Marshall Pierce

unread,
Jan 30, 2016, 12:25:55 PM1/30/16
to metric...@googlegroups.com
Timers use an exponentially weighted decaying reservoir by default. This is meant to represent a roughly five minute view of your data. This may or may not be what you want, and also requires that the underlying data follow the normal distribution (which your data almost certainly does not).

I have an alternate reservoir impl that is well-suited for storing such non-normal service time data; see https://bitbucket.org/marshallpierce/hdrhistogram-metrics-reservoir. One of the many things slated for metrics v4 is the ability to control the default reservoir used for Timers and Histograms, but for now you’d have to manually create your Timer instances and register them rather than letting them be created with the defaults.
> --
> You received this message because you are subscribed to the Google Groups "metrics-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to metrics-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Mark Sievers

unread,
Feb 8, 2016, 8:19:27 PM2/8/16
to metrics-user
Came here to understand more about the Histogram part of Timers, in particular what range of data the distribution is supposed to represent: since the application started, the last 15 mins, 10mins, 5mins?

Reading the manual a bit more thoroughly found that the relevant information (Histogram data in Timers) is found in the Histogram section.

Great library, thanks to the maintainers.
Reply all
Reply to author
Forward
0 new messages