jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1464580 - in /jmeter/trunk: bin/jmeter.properties src/core/org/apache/jmeter/reporters/ResultCollector.java xdocs/changes.xml
Date Thu, 04 Apr 2013 14:51:30 GMT
Author: pmouawad
Date: Thu Apr  4 14:51:30 2013
New Revision: 1464580

URL: http://svn.apache.org/r1464580
Log:
Bug 54777 - Improve Performance of default ResultCollector 
Add saving.autoflush
Bugzilla Id: 54777

Modified:
    jmeter/trunk/bin/jmeter.properties
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/bin/jmeter.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.properties?rev=1464580&r1=1464579&r2=1464580&view=diff
==============================================================================
--- jmeter/trunk/bin/jmeter.properties (original)
+++ jmeter/trunk/bin/jmeter.properties Thu Apr  4 14:51:30 2013
@@ -448,6 +448,12 @@ log_level.jorphan=INFO
 # Prefix used to identify filenames that are relative to the current base
 #jmeter.save.saveservice.base_prefix=~/
 
+# AutoFlush on each line written in XML or CSV output
+# Setting this to true will result in less test results data loss in case of Crash
+# but with impact on performances, particularly for intensive tests (low or no pauses)
+# Since JMeter 2.10, this is false by default
+#saving.autoflush=false
+
 #---------------------------------------------------------------------------
 # Settings that affect SampleResults
 #---------------------------------------------------------------------------

Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java?rev=1464580&r1=1464579&r2=1464580&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java Thu Apr  4 14:51:30
2013
@@ -51,6 +51,7 @@ import org.apache.jmeter.testelement.Tes
 import org.apache.jmeter.testelement.TestStateListener;
 import org.apache.jmeter.testelement.property.BooleanProperty;
 import org.apache.jmeter.testelement.property.ObjectProperty;
+import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jmeter.visualizers.Visualizer;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.jorphan.util.JMeterError;
@@ -95,6 +96,9 @@ public class ResultCollector extends Abs
 
     private static final String SUCCESS_ONLY_LOGGING = "ResultCollector.success_only_logging";
// $NON-NLS-1$
 
+    /** AutoFlush on each line */
+    private static final boolean SAVING_AUTOFLUSH = JMeterUtils.getPropDefault("saving.autoflush",
false); //$NON-NLS-1$
+
     // Static variables
 
     // Lock used to guard static mutable variables
@@ -420,7 +424,7 @@ public class ResultCollector extends Abs
                 }
             }
             writer = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new
FileOutputStream(filename,
-                    trimmed)), SaveService.getFileEncoding("UTF-8")), false); // $NON-NLS-1$
+                    trimmed)), SaveService.getFileEncoding("UTF-8")), SAVING_AUTOFLUSH);
// $NON-NLS-1$
             log.debug("Opened file: "+filename);
             files.put(filename, new FileEntry(writer, saveConfig));
         } else {

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1464580&r1=1464579&r2=1464580&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Apr  4 14:51:30 2013
@@ -86,6 +86,10 @@ This does not affect JMeter operation.
 
 <p>SMTP Sampler now uses eml file subject if subject field is empty</p>
 
+<p>With this version autoFlush has been turned off on PrintWriter in charge of writing
test results. 
+This results in improved throughput for intensive tests but can result in more test data
loss in case
+of JMeter crash (very rare). To revert to previous behaviour set saving.autoflush property
to true. </p>
+
 <!-- =================== Bug fixes =================== -->
 
 <h2>Bug fixes</h2>



Mime
View raw message