python-diamond / Diamond

Diamond is a python daemon that collects system metrics and publishes them to Graphite (and others). It is capable of collecting cpu, memory, network, i/o, load and disk metrics. Additionally, it features an API for implementing custom collectors for gathering metrics from almost any source.
http://diamond.readthedocs.org/
MIT License
1.74k stars 601 forks source link

Allow setting a timestamp when publishing a metric #665

Closed TomTheBear closed 2 years ago

TomTheBear commented 7 years ago

I have collectors that publish multiple metrics in one process run. Since it takes some time to get the data, I would like to set the timestamp when calling the publish function. This PR just adds the timestamp as a optional parameter to the publish function and forwards the value to the Metric class.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 24.667% when pulling 28f064e6556171b218c8d26b6a626104a3792979 on TomTheBear:timestamp_for_collector into f2bece462577a7c557be8a9f90f6b9340c3db571 on python-diamond:master.

shortdudey123 commented 2 years ago

Used #448 instead.