public void add(SampleResult res) { // Add Sample Counter setSampleCount(getSampleCount() + res.getSampleCount()); setBytes(getBytesAsLong() + res.getBytesAsLong()); setSentBytes(getSentBytes() + res.getSentBytes()); // Add Error Counter if (!res.isSuccessful()) { errorCount++; this.setSuccessful(false); } // Set start/end times if (getStartTime()==0){ // Bug 40954 - ensure start time gets started! this.setStartTime(res.getStartTime()); } else { this.setStartTime(Math.min(getStartTime(), res.getStartTime())); } this.setEndTime(Math.max(getEndTime(), res.getEndTime())); setLatency(getLatency()+ res.getLatency()); setConnectTime(getConnectTime()+ res.getConnectTime()); elapsed += res.getTime(); }
synchronized (sampleStore) { String key = StatisticalSampleResult.getKey(e, keyOnThreadName); StatisticalSampleResult statResult = sampleTable.get(key); if (statResult == null) { statResult = new StatisticalSampleResult(e.getResult()); .add(new SampleEvent(statResult, e.getThreadGroup())); statResult.add(e.getResult()); sampleCount++; boolean sendNow = false;
@Override public long getTimeStamp() { return getEndTime(); }
result = new StatisticalSampleResult(timeStamp, elapsed); } else { result = new SampleResult(timeStamp, elapsed);