promql.timestamp() 函数
promql.timestamp()
实现了等同于 PromQL 的 timestamp()
函数的功能。
重要提示: internal/promql
包不适合外部使用。
函数类型签名
(<-tables: stream[{A with _value: float}]) => stream[{A with _value: float}]
有关更多信息,请参阅 函数类型签名。
参数
tables
输入数据。默认为管道前向数据 (<-
)。
示例
将时间戳转换为自 Unix 纪元以来的秒数
import "internal/promql"
import "sampledata"
sampledata.float()
|> promql.timestamp()
此页内容对您有帮助吗?
感谢您的反馈!