You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2022/01/05 15:24:34 UTC

[jmeter] branch master updated: No Graphs displayed in Aggregate Report/Response Time Graph

This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 37be72f  No Graphs displayed in Aggregate Report/Response Time Graph
37be72f is described below

commit 37be72fc48121c142c0a4be1c634373e0f929882
Author: Felix Schumacher <fe...@internetallee.de>
AuthorDate: Wed Jan 5 16:23:01 2022 +0100

    No Graphs displayed in Aggregate Report/Response Time Graph
    
    Make sure, that we scale away from zero (which is in our case mostly up).
    Otherwise we might end up with a scaling factor of zero, which would
    result in really small images.
    
    Bugzilla Id: 65784
---
 .../src/main/java/org/apache/jmeter/visualizers/AxisGraph.java        | 2 +-
 .../main/java/org/apache/jmeter/visualizers/RespTimeGraphChart.java   | 4 ++--
 xdocs/changes.xml                                                     | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/AxisGraph.java b/src/components/src/main/java/org/apache/jmeter/visualizers/AxisGraph.java
index c241a4f..5725557 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/AxisGraph.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/AxisGraph.java
@@ -399,7 +399,7 @@ public class AxisGraph extends JPanel {
             // Y Axis
             try {
                 BigDecimal round = BigDecimal.valueOf(max / 1000d);
-                round = round.setScale(0, RoundingMode.HALF_EVEN);
+                round = round.setScale(0, RoundingMode.UP);
                 double topValue = round.doubleValue() * 1000;
                 yaxis.setUserDefinedScale(0, 500);
                 yaxis.setNumItems((int) (topValue / 500)+1);
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/RespTimeGraphChart.java b/src/components/src/main/java/org/apache/jmeter/visualizers/RespTimeGraphChart.java
index 02ab8f0..bc1af59 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/RespTimeGraphChart.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/RespTimeGraphChart.java
@@ -282,7 +282,7 @@ public class RespTimeGraphChart extends JPanel {
             double[][] _data, int _width, int _height, int _incrScaleYAxis,
             Color[] _color, Font legendFont, Graphics g) {
 
-        double max = maxYAxisScale > 0 ? maxYAxisScale : getTopValue(findMax(_data), RoundingMode.HALF_EVEN); // define max scale y axis
+        double max = maxYAxisScale > 0 ? maxYAxisScale : getTopValue(findMax(_data), RoundingMode.UP); // define max scale y axis
         try {
             // if the title graph is empty, we can assume some default
             if (_title.length() == 0 ) {
@@ -332,7 +332,7 @@ public class RespTimeGraphChart extends JPanel {
                 double incrYAxis = max / numInterval;
                 double incrTopValue = _incrScaleYAxis;
                 if (_incrScaleYAxis == 0) {
-                    incrTopValue = getTopValue(incrYAxis, RoundingMode.HALF_EVEN);
+                    incrTopValue = getTopValue(incrYAxis, RoundingMode.HALF_UP);
                 }
                 if (incrTopValue < 1) {
                     incrTopValue = 1.0d; // Increment cannot be < 1
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index c6cbeb9..79c70d7 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -224,6 +224,7 @@ however, the profile can't be updated while the test is running.
 <h3>Listeners</h3>
 <ul>
   <li><bug>64962</bug>Save CSV sub-results recursively from View Results Tree</li>
+  <li><bug>65784</bug>No Graphs displayed in Aggregate Report/Response Time Graph</li>
 </ul>
 
 <h3>Timers, Assertions, Config, Pre- &amp; Post-Processors</h3>