linzhengen / tech-notes

My tech notes write in github issues🧲
1 stars 0 forks source link

[20231020] rate vs irate #189

Open linzhengen opened 11 months ago

linzhengen commented 11 months ago

rate

https://prometheus.io/docs/prometheus/latest/querying/functions/#rate

rate acts on native histograms by calculating a new histogram where each component (sum and count of observations, buckets) is the rate of increase between the respective component in the first and last native histogram in v.

irate

https://prometheus.io/docs/prometheus/latest/querying/functions/#irate

irate(v range-vector) calculates the per-second instant rate of increase of the time series in the range vector. This is based on the last two data points. Breaks in monotonicity (such as counter resets due to target restarts) are automatically adjusted for.