关于graphite的几个function

scale

至关于乘法.好比15,scale(10)以后是150,sacle(10)以后是-150html

Takes one metric or a wildcard seriesList followed by a constant, and multiplies the datapoint by the constant provided at each point.ide

scaleToSeconds

好比9,scaleToSeconds(60)=54(好比默认是10s采样一次)this

Takes one metric or a wildcard seriesList and returns “value per seconds” where seconds is a last argument to this functions.Useful in conjunction with derivative or integral function if you want to normalize its result to a known resolution for arbitrary retentionsspa

derivative

“导数”的概念,求变化值,不根据时间规范化,好比原来是56,后来是9,那么变化就是-47.net

This is the opposite of the integral function. This is useful for taking a running total metric and calculating the delta between subsequent data points.This function does not normalize for periods of time, as a true derivative would.orm

nonNegativeDerivative

非负求导数,好比原来是56,后来是9,那么差值为-47,为负数会被忽略掉。可是能够给nonNegativeDerivative传参数,好比nonNegativeDerivative(100)就至关于-47+100+1=54htm

Same as the derivative function above, but ignores datapoints that trend down. Useful for counters that increase for a long time, then wrap or reset. (Such as if a network interface is destroyed and recreated by unloading and re-loading a kernel module, common with USB / WiFi cards.)blog

integral

“积分”的概念,至关于不断累加值图片

This will show the sum over time, sort of like a continuous addition function. Useful for finding totals or trends in metrics that are collected per minute.ip

persecond

至关于scaleToSeconds(nonNegativeDerivative(metric),1)

NonNegativeDerivative adjusted for the series time interval This is useful for taking a running total metric and showing how many requests per second were handled.

该操做对于累积的counter metric很是有用,能够算出每秒的变更值,好比

图片描述

加上persecond以后就能够把累积的count值转换为变化的曲线

doc

相关文章
相关标签/搜索