我向Graphite发送垃圾收集所花费的时间(通过jmx从jvm获取)。这是一个增加的反击。他们是一种让Graphite图表每分钟都有变化的方法,所以我可以看到一个图表,显示每分钟花在GC上的时间吗?
答案 0 :(得分:20)
您应该可以使用Derivative函数将计数器变为命中率,然后使用汇总函数将计数器输入到您之后的时间范围内。
&target=summarize(derivative(java.gc_time), "1min") # time spent per minute
<强>衍生物(seriesList)强>
This is the opposite of the integral function. This is useful for taking a
running totalmetric and showing how many requests per minute were handled.
&target=derivative(company.server.application01.ifconfig.TXPackets)
每次运行ifconfig时,RX和TXPackets都会更高(假设有网络流量。) 通过应用派生函数,您可以了解发送或接收的每分钟数据包,即使您只记录总数。
汇总(seriesList,intervalString,func ='sum',alignToFrom = False)
Summarize the data into interval buckets of a certain size.
By default, the contents of each interval bucket are summed together.
This is useful for counters where each increment represents a discrete event and
retrieving a “per X” value requires summing all the events in that interval.