JMeter JTL Files
Understanding Apache JMeter JTL files, their structure, and how to edit or repair them for accurate performance test reporting.
Mark
Performance Testing Expert
When Apache JMeter captures test results, the data is typically written to a log file known as a JTL file. Understanding the structure of these files is essential for effective performance test analysis.
JTL File Structure
The JTL file begins with a header line containing column names, followed by individual test point data on separate lines.
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,Latency,IdleTime,Connect
1541088455861,603,0.0_Home Page,200,OK,Advertise Job 1-1,text,true,,2674,301,10,30,515,0,130
Understanding the Timestamp
The timeStamp field represents an Epoch timestamp (seconds since January 1, 1970). Apache JMeter adds three decimal places of precision to this value.
For example, the timestamp 1541088455861 corresponds to November 1, 2018 at 16:07 UTC.
Key Fields
| Field | Description |
|---|---|
| timeStamp | Epoch time with milliseconds |
| elapsed | Response time in milliseconds |
| label | Sampler name |
| responseCode | HTTP response code |
| success | Pass/fail status |
| bytes | Response size |
| Latency | Time to first byte |
| Connect | Connection establishment time |
Editing JTL Files
HTML test reports generated from JTL files include all line entries. When you need to exclude specific data sections, such as ramp-up or ramp-down periods, you can remove those rows if you know their timestamps.
A practical approach involves:
- Calculate the epoch timestamp for the desired timeframe
- Remove unwanted lines from the JTL file
- Regenerate the HTML report
This preserves data integrity for analysis while focusing on the steady-state period.
Repairing Damaged Files
If a test fails or the Java process terminates unexpectedly, the JTL file may become corrupted. Since it’s a plain text file, repairs are straightforward.
Incomplete Final Line
The typical issue occurs when the final line isn’t completely written. When attempting to generate an HTML report, the system fails due to incorrect column counts.
Solution: Open the file in a text editor, remove the incomplete final line, and save.
Problematic String Values
Failure messages sometimes contain commas, which disrupts the comma-separated format and causes column mismatches during HTML report generation.
Solution:
- Search the file for the problematic failure message
- Remove the extra comma from the failure message
- Save the file
- Regenerate the report
Useful Tools
When working with epoch timestamps, online conversion tools can help:
Further Reading
Tags: