Splitting JTL files
During a typical performance test, traffic will be loaded gradually before reaching the desired steady state. In Apache JMeter the ramp-up and steady state data points would be captured in the same JTL file. When generating the HTML report this can make it hard to isolate the data you want to target.
Since a JTL file is a csv file it can be altered. To identify the data that we wish to extract we simply need to target the epoch time range. This is the data captured in the timeStamp column of the JTL file.
To ease this process we have created a BASH shell script which will extract data, removing any ramp-up and ramp-down data points. It can also break up the data into the required duration.
To use the script you will need BASH with bc installed. Then copy the code to a file called split-jtl.sh and make sure it is executable.
The script expects input values from the command line. These are ramp-up, ramp-down, hold and filename. If any of the values are not entered you will be prompted with a help dialogue. This example has a 600 second ramp-up, no ramp-down and we want to generate reports for 1800 second periods.
./split-jtl.sh 600 0 1800 dummy.jtl