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

(-)src/core/org/apache/jmeter/reporters/ResultCollector.java (+24 lines)
Lines 133-138 Link Here
133
    private volatile boolean inTest = false;
133
    private volatile boolean inTest = false;
134
134
135
    private volatile boolean isStats = false;
135
    private volatile boolean isStats = false;
136
    
137
    /** the summarizer on which this result collector will forward the samples */
138
    private Summariser summariser = null;
136
139
137
    /**
140
    /**
138
     * No-arg constructor.
141
     * No-arg constructor.
Lines 235-240 Link Here
235
                inTest = false;
238
                inTest = false;
236
            }            
239
            }            
237
        }
240
        }
241
242
        if(summariser != null) {
243
            summariser.testEnded(host);
244
        }
238
    }
245
    }
239
246
240
    public synchronized void testStarted(String host) {
247
    public synchronized void testStarted(String host) {
Lines 250-255 Link Here
250
            }
257
            }
251
        }
258
        }
252
        inTest = true;
259
        inTest = true;
260
261
        if(summariser != null) {
262
            summariser.testStarted(host);
263
        }
253
    }
264
    }
254
265
255
    public void testEnded() {
266
    public void testEnded() {
Lines 484-489 Link Here
484
                }
495
                }
485
            }
496
            }
486
        }
497
        }
498
        
499
        if(summariser != null) {
500
        	summariser.sampleOccurred(event);
501
        }
487
    }
502
    }
488
503
489
    protected final void sendToVisualizer(SampleResult r) {
504
    protected final void sendToVisualizer(SampleResult r) {
Lines 577-581 Link Here
577
    // can find the Clearable nodes - the userObject has to implement the interface.
592
    // can find the Clearable nodes - the userObject has to implement the interface.
578
    public void clearData() {
593
    public void clearData() {
579
    }
594
    }
595
    
596
    /**
597
     * set the summarizer on which this result collector will forward
598
     * When running in distributed testing + non gui, the sample won't be sent twice from the slave to the master
599
     * @param summariser the summarizer
600
     */
601
    public void setSummariser(Summariser summariser) {
602
        this.summariser = summariser;
603
    }
580
604
581
}
605
}

Return to bug 47398