本文介绍了计算InfluxDB中开始事件与结束事件之间的持续时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我为InfluxDB有两个写点,一个是开始,另一个是结束.我只需要确定这两个事件之间的持续时间,并对其进行查询. InfluxDB具有difference()聚合方法,但不适用于时间元字段.
I have two write points for InfluxDB, one is the start and the other is the end. I just need to determine the duration between those two events, and make queries around it. InfluxDB has difference() aggregate method, but it doesn't work on the time meta field.
提供自定义时间戳记值是完成此操作的唯一方法吗?
Is supplying a custom timestamp value the only way to accomplish this?
推荐答案
按照"我可以针对时间戳执行数学运算吗?"
否:
是的,也许是:
所以这取决于数据的形状.
So it depends on the shape of your data.
这篇关于计算InfluxDB中开始事件与结束事件之间的持续时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!