graphite: how to get per-second metrics from batch metrics?
<p>I'm trying to measure a online mini-batch processing system with a per-second metrics (total query per second). For every batch, a metric (e.g. <code>"stats.gauges.&lt;host&gt;.query.count"</code>) will be send to graphite. batches are processed in several different hosts in parallel and a batch of data take about 5 seconds to process.
I've tried:</p>

<ol>
<li>simply sum series: <code>sumSeries(stats.gauges.*.query.count)</code>, 
the result metrics is many times greater than the actual value;</li>
<li>scale    to 1 second:
<code>scaleToSeconds(sumSeries(stats.gauges.*.query.count),
1)</code>, the result metrics is much less than the actual value;   </li>
<li>integral then derivative: <code>nonNegativeDerivative(sumSeries(integral(stats.gauges.*.query.count)))</code>, same as the first case ... </li>
<li>send gauges with<br>
<code>delta=True</code> param, then derivative. the result is about 20% greater 
than the actual value</li>
</ol>

<p>so, how to get per-second metrics from batch metrics? what is the best practice?</p>