Author: sebb Date: Sat Nov 8 14:35:12 2008 New Revision: 712443 URL: http://svn.apache.org/viewvc?rev=712443&view=rev Log: Bug 34096 - Duplicate samples not eliminated when writing to CSV files
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java jakarta/jmeter/trunk/xdocs/changes.xml Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java?rev=712443&r1=712442&r2=712443&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java Sat Nov 8 14:35:12 2008 @@ -456,13 +456,20 @@ if (isSampleWanted(result.isSuccessful())) { sendToVisualizer(result); - if ( out != null) {// no point otherwise + if (out != null && !isResultMarked(result) && !this.isStats) { SampleSaveConfiguration config = getSaveConfig(); result.setSaveConfig(config); try { if (config.saveAsXml()) { - recordResult(event); - } else { + if (SaveService.isSaveTestLogFormat20()) { + if (serializer == null) { + serializer = new DefaultConfigurationSerializer(); + } + out.write(OldSaveService.getSerializedSampleResult(result, serializer, config)); + } else { // !LogFormat20 + SaveService.saveSampleResult(event, out); + } + } else { // !saveAsXml String savee = CSVSaveService.resultToDelimitedString(event); out.println(savee); } @@ -479,21 +486,6 @@ } } - // Only called if out != null - private void recordResult(SampleEvent event) throws Exception { - SampleResult result = event.getResult(); - if (!isResultMarked(result) && !this.isStats) { - if (SaveService.isSaveTestLogFormat20()) { - if (serializer == null) { - serializer = new DefaultConfigurationSerializer(); - } - out.write(OldSaveService.getSerializedSampleResult(result, serializer, getSaveConfig())); - } else { - SaveService.saveSampleResult(event, out); - } - } - } - /** * recordStats is used to save statistics generated by visualizers * Modified: jakarta/jmeter/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=712443&r1=712442&r2=712443&view=diff ============================================================================== --- jakarta/jmeter/trunk/xdocs/changes.xml (original) +++ jakarta/jmeter/trunk/xdocs/changes.xml Sat Nov 8 14:35:12 2008 @@ -154,6 +154,7 @@ <li>TCP sampler now calls setupTest() and teardownTest() methods</li> <li>Bug 45458 - Point to Point JMS in combination with authentication</li> <li>Bug 45460 - JMS TestPlan elements depend on resource property</li> +<li>Bug 34096 - Duplicate samples not eliminated when writing to CSV files</li> </ul> <h3>Improvements</h3> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]