metrics简述
com.codahale.metrics
metrics-core
${metrics.version}
name=requests, count=, min=0., max=4., mean=1.00724, stddev=0.68051, median=0., p75=1., p95=1.99996, p98=1.99988, p99=2.0002, p999=4., mean_rate=0.0, m1=0.0, m5=0.0, m15=0.0, rate_unit=events/millisecond, duration_unit=milliseconds
metrics 统计值。
“version”: “3.0.0”,
“timers”: {
“count”: 0,// 总次数
“max”: 0,// 最长时间
“mean”: 0,// 平均时间
“min”: 0,// 最短时间
“p50”: 0,// 中位数
“p75”: 0,// 75th 分位数
“p95”: 0,// 95th 分位数
“p98”: 0,// 98th 分位数
“p99”: 0,// 99th 分位数
“p999”: 0,// 999th 分位数
“stddev”: 0, //方差
“m15_rate”: 0,// 15分钟 请求数/每秒的比率
“m1_rate”: 0,// 1分钟 请求数/每秒的比率
“m5_rate”: 0,// 5分钟 请求数/每秒的比率
“mean_rate”: 0,// 平均每秒请求数
“duration_units”: “seconds”,//该Timer的单位
下面就来说是各个指标,尤其是p99 和p999
They’re most meaningful for high-frequency queries; where other monitoring systems have trouble providing any visibility at all into fast and frequent queries, we can also identify outlier performance. This is a huge blind spot for many people.
It is also a useful feature for proactive monitoring and notification. Since we are generating this value per-query you can set an alert on specific query performance. This could be a much more accurate way of alerting on unusual behaviour as compared to setting a threshold against average latency.
说白了就是,平均值只能反映一般情况,而百分比指标其实是在于统计分布图中大多数的场景,显示了长尾效应的异常行为,而平均值却没有。即了解请求对应用程序的最差体验。曾经经历过的耗时最长的经历。
它们对于高频查询的场景最具有意义。如果其他监控系统无法提供对快速和频繁查询的任何可见性,则我们还可以确定异常性能。对于大多数人来说,这是一个巨大的盲点。
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/201289.html原文链接:https://javaforall.net
