jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1802726 - /jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java
Date Sun, 23 Jul 2017 14:03:56 GMT
Author: pmouawad
Date: Sun Jul 23 14:03:56 2017
New Revision: 1802726

URL: http://svn.apache.org/viewvc?rev=1802726&view=rev
Log:
Buffer writing

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java?rev=1802726&r1=1802725&r2=1802726&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultSaver.java Sun Jul 23 14:03:56
2017
@@ -18,6 +18,7 @@
 
 package org.apache.jmeter.reporters;
 
+import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
@@ -197,8 +198,9 @@ public class ResultSaver extends Abstrac
             JMeterContextService.getContext().getVariables().put(variable, fileName);
         }
         File out = new File(fileName);
-        try (FileOutputStream fos = new FileOutputStream(out)){
-            JOrphanUtils.write(s.getResponseData(), fos); // chunk the output if necessary
+        try (FileOutputStream fos = new FileOutputStream(out);
+                BufferedOutputStream bos = new BufferedOutputStream(fos)){
+            JOrphanUtils.write(s.getResponseData(), bos); // chunk the output if necessary
         } catch (FileNotFoundException e) {
             log.error("Error creating sample file for {}", s.getSampleLabel(), e);
         } catch (IOException e) {



Mime
View raw message