Prometheus:当抓取间隔较长时,速率函数如何计算每秒速率?

Prometheus: How does the rate function calculate per second rate when scrape interval is longer?

来自 Prometheus 文档的速率函数执行以下操作:

rate(v range-vector) calculates the per-second average rate of increase of the time series in the range vector.

当抓取间隔像 15 seconds 这样长时,这怎么可能?我的意思是当数据点至少相距 15 秒时,Prometheus 如何估计 "per-second" 值? 我假设变化估计在刮擦间隔内是均匀的,但想确定。

I assume that the change is estimated to be uniform in the scrape interval but want to be sure.

是的,是这样的。 return 值的单位是每秒。