View | Details | Raw Unified | Return to bug 60453
Collapse All | Expand All

(-)a/src/core/org/apache/jmeter/reporters/SummariserRunningSample.java (-2 / +6 lines)
Lines 122-132 class SummariserRunningSample { Link Here
122
        errorCount += res.getErrorCount();
122
        errorCount += res.getErrorCount();
123
        long aTimeInMillis = res.getTime();
123
        long aTimeInMillis = res.getTime();
124
        runningSum += aTimeInMillis;
124
        runningSum += aTimeInMillis;
125
        if (aTimeInMillis > max) {
125
        if ( res.getSampleCount() == 1 && aTimeInMillis > max ) {
126
            max = aTimeInMillis;
126
            max = aTimeInMillis;
127
        } else if (res.getSampleCount() > 1 && res.getMaxTime() > max) {
128
            max = res.getMaxTime();
127
        }
129
        }
128
        if (aTimeInMillis < min) {
130
        if ( res.getSampleCount() == 1 && aTimeInMillis < min ) {
129
            min = aTimeInMillis;
131
            min = aTimeInMillis;
132
        } else if (res.getSampleCount() > 1 && res.getMinTime() < min ) {
133
            min = res.getMinTime();
130
        }
134
        }
131
        // We want end time to be current time so sample rates reflect real time
135
        // We want end time to be current time so sample rates reflect real time
132
        endTime = System.currentTimeMillis();
136
        endTime = System.currentTimeMillis();
(-)a/src/core/org/apache/jmeter/samplers/SampleResult.java (+26 lines)
Lines 152-157 public class SampleResult implements Serializable, Cloneable, Searchable { Link Here
152
152
153
    private long endTime = 0;
153
    private long endTime = 0;
154
154
155
    //Used in Statistical SampleResult
156
    private long minTime = 0;
157
158
    //Used in Statistical SampleResult
159
    private long maxTime = 0;
160
155
    private long idleTime = 0;// Allow for non-sample time
161
    private long idleTime = 0;// Allow for non-sample time
156
162
157
    /** Start of pause (if any) */
163
    /** Start of pause (if any) */
Lines 1055-1060 public class SampleResult implements Serializable, Cloneable, Searchable { Link Here
1055
        }
1061
        }
1056
    }
1062
    }
1057
1063
1064
    //Used in Statistical SampleResult
1065
    public void setMaxTime(long maxTime) {
1066
        this.maxTime = maxTime;
1067
    }
1068
1069
    //Used in Statistical SampleResult
1070
    public  long getMaxTime() {
1071
        return this.maxTime;
1072
    }
1073
1074
    //Used in Statistical SampleResult
1075
    public void setMinTime(long minTime) {
1076
        this.minTime = minTime;
1077
    }
1078
1079
    //Used in Statistical SampleResult
1080
    public  long getMinTime() {
1081
        return this.minTime;
1082
    }
1083
1058
    /**
1084
    /**
1059
     * Set idle time pause.
1085
     * Set idle time pause.
1060
     * For use by SampleResultConverter/CSVSaveService.
1086
     * For use by SampleResultConverter/CSVSaveService.
(-)a/src/core/org/apache/jmeter/samplers/StatisticalSampleResult.java (-1 / +10 lines)
Lines 84-91 public class StatisticalSampleResult extends SampleResult implements Link Here
84
        // Set start/end times
84
        // Set start/end times
85
        if (getStartTime()==0){ // Bug 40954 - ensure start time gets started!
85
        if (getStartTime()==0){ // Bug 40954 - ensure start time gets started!
86
            this.setStartTime(res.getStartTime());
86
            this.setStartTime(res.getStartTime());
87
            this.setMinTime(res.getTime());
88
            this.setMaxTime(res.getTime());
87
        } else {
89
        } else {
88
            this.setStartTime(Math.min(getStartTime(), res.getStartTime()));
90
            this.setStartTime(Math.min(getStartTime(), res.getStartTime()));
91
            if ( res.getTime() > this.getMaxTime() )
92
            {
93
                this.setMaxTime(res.getTime());
94
            }
95
            if ( res.getTime() < this.getMinTime() )
96
            {
97
                this.setMinTime(res.getTime());
98
            }
89
        }
99
        }
90
        this.setEndTime(Math.max(getEndTime(), res.getEndTime()));
100
        this.setEndTime(Math.max(getEndTime(), res.getEndTime()));
91
101
92
- 

Return to bug 60453