title: How to edit summary.csv file after jmeter load run
body: <p>After running my load test Jmeter generate result onto "summary.csv".<br>
  Some urls in this file looks like:</p>
  
  <pre><code>1482255989405,3359,POST ...users/G0356GM7QOITIMGA/...
  1482255989479,3310,POST ...users/HRC50JG3T524N9RN/...
  1482255989488,3354,POST ...users/54QEGZB54BEWOCJJ/...
  </code></pre>
  
  <p>Where "...users/G0356GM7QOITIMGA/..." - its URL column.<br>
  After that I try to generate jmeter-report using this command:</p>
  
  <pre><code>jmeter -g summary.csv -o report
  </code></pre>
  
  <p>Howewer this action throw Out of memory exception (because of many different URLs).<br>
  So I decide to edit summary.csv in <strong>tearDown Thread Group</strong> and replace all ID to "someID" string, using <strong>BeanShell Sampler</strong>:<br></p>
  
  <pre><code>import java.io.*;
  import org.apache.jmeter.services.FileServer;
   try {
          String sep = System.getProperty("line.separator");
          String summaryFileDirPath = FileServer.getFileServer().getBaseDir() + File.separator;
          String summaryFilePath = summaryFileDirPath + "summary.csv";
          log.info("read " + summaryFilePath);
          File file = new File(summaryFilePath);
          BufferedReader reader = new BufferedReader(new FileReader(file));
          String line;
          String text = "";
          while ((line = reader.readLine()) != null) {
              text += line + sep;
          }
          reader.close();
          log.info(summaryFilePath);
          file.delete();
  
          FileWriter writer = new FileWriter(summaryFileDirPath + "summary.csv", false);
          writer.write(text.replaceAll("users/[A-Z0-9]*/", "users/EUCI/"));
          writer.close();
      } catch (Exception e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>Result:<br><a href="https://i.stack.imgur.com/e6J7q.png" rel="nofollow noreferrer">summary.csv screen</a></p>
  
  <p>Seems like Jmeter append some rows after <strong>tearDown Thread Group</strong> ends his work.<br>
  How can I edit summary.csv file after test run using only jmeter script?<br>
  PS: I need collect result only in summary.csv</p>