Bug 60278 - Since 2.13 (and Bugzilla 57514), Aggregate Graph, Summary Report and Aggregate Report lost precision in the Error, Rate and Bandwidth values saved in the saved file csv
Summary: Since 2.13 (and Bugzilla 57514), Aggregate Graph, Summary Report and Aggregat...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: All All
: P2 regression (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on: 57514
Blocks:
  Show dependency tree
 
Reported: 2016-10-19 18:34 UTC by Milamber
Modified: 2016-10-22 19:08 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milamber 2016-10-19 18:34:42 UTC
Try to open a aggregate report saved into a file with the Aggregate listener.

With 2.12 :
sampler_label,aggregate_report_count,average,aggregate_report_median,aggregate_report_90%_line,aggregate_report_min,aggregate_report_max,aggregate_report_error%,aggregate_report_rate,aggregate_report_bandwidth
SAMPLER1,204,82434,76089,129444,1159,208015,0.09313725490196079,0.03735365469805521,21.15778783560153

With nightly (and 2.13, 3.0) :
Label,# Samples,Average,Median,90% Line,95% Line,99% Line,Min,Max,Error %,Throughput,Received KB/sec,Sent KB/sec
SAMPLER1,204,82434,76089,129444,145355,177257,1159,208015,9.31%,.0,21.16,0.00

The %Error value :
0.09313725490196079 --> 9.31% (lost precision)

The Rate value:
0.03735365469805521 --> .0 (lost value!)

The bandwidth value:
21.15778783560153 -->21.16 (lost precision)

The new Sent KB value will probably lost precision too.

The bugzilla https://bz.apache.org/bugzilla/show_bug.cgi?id=57514 are the source of theses issues, with the FORMATS array inside the SummaryReport.java.
Comment 1 Philippe Mouawad 2016-10-19 20:04:07 UTC
(In reply to Milamber from comment #0)
> Try to open a aggregate report saved into a file with the Aggregate listener.
> 
> With 2.12 :
> sampler_label,aggregate_report_count,average,aggregate_report_median,
> aggregate_report_90%_line,aggregate_report_min,aggregate_report_max,
> aggregate_report_error%,aggregate_report_rate,aggregate_report_bandwidth
> SAMPLER1,204,82434,76089,129444,1159,208015,0.09313725490196079,0.
> 03735365469805521,21.15778783560153
> 
> With nightly (and 2.13, 3.0) :
> Label,# Samples,Average,Median,90% Line,95% Line,99% Line,Min,Max,Error
> %,Throughput,Received KB/sec,Sent KB/sec
> SAMPLER1,204,82434,76089,129444,145355,177257,1159,208015,9.31%,.0,21.16,0.00
> 
> The %Error value :
> 0.09313725490196079 --> 9.31% (lost precision)
> 
> The Rate value:
> 0.03735365469805521 --> .0 (lost value!)
> 
> The bandwidth value:
> 21.15778783560153 -->21.16 (lost precision)
> 
> The new Sent KB value will probably lost precision too.
> 
> The bugzilla https://bz.apache.org/bugzilla/show_bug.cgi?id=57514 are the
> source of theses issues, with the FORMATS array inside the
> SummaryReport.java.

Hi Milamber,
The export makes some rounding. 
It doesn't hurt me except for the Rate value.
We could increase the number of decimals by 1 or 2.

What do you think ?
Thanks
Comment 2 Milamber 2016-10-19 22:17:26 UTC
In my opinion, the full value seems better.

In my example, JMeter display 2.2 samples/min for the Rate of SAMPLER1 (calculate from 0.03735365469805521 * 60 to convert seconds to minutes)

If I use 0.037 * 60 that works : 2.2 samples/min, but I use only 0.03 * 60 : 1.8 samples/min.

Another example, if the rate is 0,0001234000 samples/sec, JMeter will display : 0.44 samples/hour (*60*60).
If I use only 0,0001 (rounding), the calculate rate will 0.36 samples/hour...

I not sure what is the good fix. 
a) back to the full value
b) increase the number of numbers after the comma
c) replace rate value in samples/sec to the calculate value of rate (sometimes per sec, per min or per hour)
Comment 3 Milamber 2016-10-21 09:41:55 UTC
If anyone objects, I will change the rounding to full value :

        new Format[]{
            null, // Label
            null, // count
            null, // Mean
            null, // Min
            null, // Max
            new DecimalFormat("#0.00"), // Std Dev. //$NON-NLS-1$
            new DecimalFormat("#0.000%"), // Error %age //$NON-NLS-1$  <= Here +1 decimal
            new DecimalFormat("#.000000"),      // Throughput //$NON-NLS-1$ <= Here +3 decimal
            new DecimalFormat("#0.00"),  // kB/sec //$NON-NLS-1$
            new DecimalFormat("#0.00"),  // sent kB/sec //$NON-NLS-1$
            new DecimalFormat("#.0"),    // avg. pageSize //$NON-NLS-1$
        };
Comment 4 Milamber 2016-10-21 09:46:02 UTC
(In reply to Milamber from comment #3)
[...]
>             new DecimalFormat("#.00000"),      // Throughput //$NON-NLS-1$
> 

Sorry :
<= Here +4 decimal (.0 -> .00000)
Comment 5 Philippe Mouawad 2016-10-22 11:45:57 UTC
(In reply to Milamber from comment #4)
> (In reply to Milamber from comment #3)
> [...]
> >             new DecimalFormat("#.00000"),      // Throughput //$NON-NLS-1$
> > 
> 
> Sorry :
> <= Here +4 decimal (.0 -> .00000)

Ok for me
Comment 6 Milamber 2016-10-22 19:08:45 UTC
URL: http://svn.apache.org/viewvc?rev=1766224&view=rev
Log:
Since 2.13 (and Bugzilla 57514), Aggregate Graph, Summary Report and Aggregate Report lost precision in the Error, Rate and Bandwidth values saved in the saved file csv
Bugzilla Id: 60278

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
    jmeter/trunk/xdocs/changes.xml