consumption: ((*value as f32 / (host_time * procfs::ticks_per_second().unwrap() as f32)) * host_power as f32),
MetricGenerator, but the
Metricstruct does not include the timestamp.
Topology, is seems that the timestamp for the host consumption is set to the point when record are generated (
refresh_record) which is not the time when the measurement are actually read , is there a reason for that ?
gen_all_metricsis only used by the prometheus exporter, sdout json and riemann exporters all implement their own logic for process consumption (which is for me the most important metric)
That's a good point, we needed some specific behavior for the riemann exporter so we didn't used the generic function. We should definitely find a cleaner way to do that.
The power consumption calculation for each process could be easily moved to MetricGenerator though, as it only requires to have access to both the topology and ProcessTracker.