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.
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.
Coverage remained the same at 24.667% when pulling 28f064e6556171b218c8d26b6a626104a3792979 on TomTheBear:timestamp_for_collector into f2bece462577a7c557be8a9f90f6b9340c3db571 on python-diamond:master.
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 thepublish
function. This PR just adds the timestamp as a optional parameter to thepublish
function and forwards the value to the Metric class.