Negative consumption values reported
JeremyNison opened this issue · 4 comments
Negative consumption values are sometimes reported in the generated .csv files. The occurences of this kind of values is variable and likly dependait of the monitored application. Particularly, executing JoularJX with the "avrora" benchmark form the DaCapo-9.12-bach benchmark suite will likely generate a bunch of negative values.
Executing the command java -javaagent:<path to joular jx jar> -jar <path to dacapo jar> avrora --size large
will generate this kind of reports joularJX-11032-all-methods-energy.csv where several methods shows a negative energy consumption.
Monitoring other benchmarks of the suite, such as jython, will not generate any negative value.
This is usually because either the process or the Java thread is terminated before the 2nd power measurement in the loop. Hence, the negative value (0 - P1).
Hopefully in the next version, we will remove the negative values that comes from this thread/process termination issue.
Potential fixes available in PR #35.
sure, I'll submit a PR from my fork. I've made a number of changes to fix the negative values issue and also to make it work on Macos. My fixes need check/review on your side though to make sure that I did not misunderstand some aspects. There's also the point of watt (in mac) vs joule (in linux) that is currently implemented in joularjx to keep in mind while interpreting the results.