Several function on graphite

  graphite

scale

It is equivalent to multiplication. For example, 15, 150 after 15,scale(10) and -150 after sac (10)

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

scaleToSeconds

For example, 9, scaletosseconds (60) = 54 (for example, the default is 10s sampling)

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 retentions

derivative

The concept of “derivative” is not standardized according to time when calculating the change value. For example, the original value is 56, then 9, then the change is -47

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

nonNegativeDerivative

If the derivative is not negative, such as 56 and 9, then the difference is -47 and negative numbers will be ignored. However, it is possible to pass parameters to non-negotiable derivative, for example, nonNegativeDerivative(100) is equivalent to -47+100+1=54

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.)

integral

The concept of “integral” is equivalent to continuously accumulating values.

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.

persecond

Equivalent to scaletoSeconds (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.

This operation is very useful for accumulated counter metric, which can calculate the change value per second, such as

图片描述

After adding persecond, the accumulated count value can be converted into a changing curve.

doc