石墨:每点时间精度 [英] Graphite: time per point precision

查看:87
本文介绍了石墨:每点时间精度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以以毫秒为单位存储每个点的时间?

Is it possibile to store time per point with millisecond precision?

由于石墨基于

Since Graphite is based on Whisper I've took a look at whisper.py file. It contains:

UnitMultipliers = {
   's' : 1,
   'm' : 60,
   'h' : 60 * 60,
   'd' : 60 * 60 * 24,
   'y' : 60 * 60 * 24 * 365,
}

因此似乎可以以最大1s的精度记录事件. 我该如何应对每10毫秒产生一次事件的系统?

so it seems that it's possibile to record events with a maximum precision of 1s. How can I cope with a system that produces an event every 10ms?

推荐答案

您可以将数据发送到Carbon-aggregator守护程序或Statsd.它们都是聚合器,因此它们聚合了毫秒数据并以每秒的值将其写出.对于碳聚合器,您必须使用希望的数据收集方式配置聚合器:求和,平均等.对于Statsd,api调用确定所使用的聚合,因此您不必预先配置它.

You can send the data to the carbon-aggregator daemon or Statsd. These are both aggregators, so they'd aggregate the millisecond data and write it out in a per second value. For carbon-aggregator, you'd have to config the aggregator with how you want the data gathered: sum, avg, etc. For Statsd, the api call determines the aggregation used, so you don't have to pre-configure it.

这篇关于石墨:每点时间精度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆