我正在向Graphite发送垃圾收集所花费的时间(通过jmx从jvm获取).这是一个增加的反击.他们是一种让Graphite图表每分钟都有变化的方法,所以我可以看到一个图表,显示每分钟花在GC上的时间吗?
小智 20
您应该能够使用Derivative函数将计数器变为命中率,然后使用汇总函数将计数器输入到您之后的时间范围内.
&target=summarize(derivative(java.gc_time), "1min") # time spent per minute
Run Code Online (Sandbox Code Playgroud)
衍生物(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)
Run Code Online (Sandbox Code Playgroud)
每次运行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.
Run Code Online (Sandbox Code Playgroud)
资料来源:http://graphite.readthedocs.org/en/0.9.10/functions.html