JMeter Produces Negative Results
emadrid (Bug 66051): I came across this issue in JMeter where it would provide negative results when calling the getTime() method in SampleResult.java. I suspect this may be an issue with how elapsedTime is calculated in setEndTime() with the calculated parameters that are fed into this method from addSubResult(), as this method does some calculations with nanoTimeOffsets, which my JMeter configuration is currently set to utilize.
https://github.com/apache/jmeter/blob/aaead67610cd61d486d6ae54dab7b05338bcf40a/src/core/src/main/java/org/apache/jmeter/samplers/SampleResult.java#L655
I thought another thing that may be related to the issue is truncation in the long data-type divison in sampleNsClockInMs(), but it seems this would only cause a small offset from the actual result but I have had Jmeter produce results up to -229 ms.
When the results come back negative, the values are also identical across AverageResponseTime, MinResponseTime, MaxResponseTime, Percentile50, Percentile90, and Percentile95.
As far as the configuration for the settings that affect the SampleResults, the only one I have configured is: sampleresult.timestamp.start=true
The defaults are being used for the rest of the sampleresult settings.
Severity: normal OS: