promql.changes() 函数
promql.changes() 实现了与 PromQL的 changes() 函数 相同的功能。
重要:internal/promql 包不适用于外部使用。
函数类型签名
(<-tables: stream[{A with _value: float}]) => stream[{B with _value: float}]
有关更多信息,请参见 Function type signatures。
参数
表格
输入数据。默认是管道转发数据 (<-).
示例
返回系列中值变化的次数
import "internal/promql"
import "sampledata"
sampledata.float()
|> promql.changes()