Closed sferencik closed 7 years ago
JetBrains have explained they can't stop sending the 0s but they guarantee they won't send a 0 for the build step completion. If a step managed to complete in under 1 ms, they'd artificially send 1.
In that sense, I propose to change the plugin to ignore the buildStepRUNNER_* events with value 0.
Sorry for the silence. Is this change something you can do, I think it should be safe to outright ignore any metric value that's 0.
Yes, my colleague or I will send a pull request.
We can ignore all the time/duration metrics with zero value, but not all the metrics in general. Some metrics (test count, artifact size, success rate, passed test cout) can have legitimate zero values.
For the record, the different metric keys are listed in this TeamCity docu page (see the table at the bottom) and this StackOverflow response gives some example values, which do indeed show valid zero values.
BTW, the plugin's statisticValuePublished()
method already recognises time/duration metrics so we can make use of that categorisation.
Each buildStepRUNNER metrics is sent twice; the first time with value 0.
This is shown in the following sequence:
This is confirmed by debugging into the
BuildStatusListener
: for each build runner, thestatisticValuePublished()
method is invoked twice: as the build starts, with value 0.0, and as the build finishes, with the actual run-time value.This is a problem in the resultant Graphite stats. The count of runs (per build runner) is doubled, and the average runtimes are halved.