Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 37 ยท Assertions and Listeners

JTL Files: Saving and Reading JMeter Results

Understand the JMeter JTL result file: CSV columns, which fields to save, how to configure saving in user.properties, and how to analyze a results file with your own script.

Every JMeter run produces a stream of samples, and the JTL file is where they land. It is the raw truth behind every chart: the HTML dashboard, the Aggregate Report and your own analysis all read it. Knowing its columns, how to control what is saved, and how to parse it yourself makes you independent of any single viewer.

Honesty note. JMeter cannot run here. The column names and property names below are those documented for the CSV result format. The runnable blocks are stand-ins that parse an example JTL text written for this lesson (not produced by a real run).

Creating a JTL

  • Command line: jmeter -n -t plan.jmx -l results.jtl. The -l option names the log file. If it already exists, JMeter appends to it, so use a fresh name (for example with a timestamp) per run.
  • Listener: a Simple Data Writer or any listener's Write results to file field. Its Configure button picks which fields to save.
  • Format: CSV by default in modern versions (the older format was XML, bulky and slow). The extension .jtl is a convention; .csv also works.

The default CSV columns

The first line is a header. A typical one is:

TEXT
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
Column Meaning
timeStamp Start time in epoch milliseconds
elapsed Response time in ms (time until the last byte)
label Sampler name
responseCode HTTP status (or a protocol/exception code like Non HTTP response code: java.net.SocketTimeoutException)
responseMessage Text such as OK
threadName For example Users 1-7 (group name, group number, thread number)
dataType text or bin
success true or false after assertions
failureMessage Assertion failure text
bytes / sentBytes Response and request sizes
grpThreads / allThreads Active threads in this group / in total at that moment
URL The requested URL
Latency Time to first byte (ms)
IdleTime Time spent not sampling
Connect Time to establish the connection (ms)

Hence the response time you see is elapsed, while Latency shows server think time plus network to the first byte; elapsed - Latency approximates download time, and Connect reveals TCP/TLS setup cost.

An example excerpt (made up for this lesson):

TEXT
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1735689600000,132,Home,200,OK,Users 1-1,text,true,,5120,210,1,1,https://shop.example.test/,95,0,22
1735689600450,358,Search,200,OK,Users 1-1,text,true,,18200,260,1,1,https://shop.example.test/search?q=shoes,300,0,0
1735689601000,2104,Checkout,500,Internal Server Error,Users 1-2,text,false,Test failed: code expected 200,812,390,2,2,https://shop.example.test/checkout,2000,0,0

Choosing what to save

Saving too little loses information you may need; saving too much slows the run and fills the disk. Settings live in user.properties (or are passed with -J). Frequently used ones:

Property Purpose
jmeter.save.saveservice.output_format=csv CSV or xml
jmeter.save.saveservice.response_data=false Do not save response bodies (default false for CSV)
jmeter.save.saveservice.response_data.on_error=true Save the body only for failed samples, useful for diagnosing
jmeter.save.saveservice.samplerData=false Request body
jmeter.save.saveservice.requestHeaders=false, responseHeaders=false Headers
jmeter.save.saveservice.assertion_results_failure_message=true Keep the failure message
jmeter.save.saveservice.timestamp_format=ms Epoch ms (or a date format)
jmeter.save.saveservice.print_field_names=true Write the header line

A sensible load-test setup is: CSV, no response data, response data on error, and failure messages on. Then failures can be diagnosed without storing gigabytes of successful responses. Pass them on the command line as -Jjmeter.save.saveservice.response_data.on_error=true.

Note that the HTML dashboard reads these columns, so do not drop timeStamp, elapsed, label, responseCode, success, bytes, sentBytes, Latency and Connect if you want the dashboard to work properly.

Parsing a JTL yourself

A JTL is just CSV, so a short script gives you any custom statistic. The stand-in parses the text above (plus a few more rows), computes errors per label and flags slow samples.

JS Stand-in: parse a JTL-style CSV and summarize by label

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Real files hold quoted fields when texts contain commas (for example a failure message), so a production parser should use a real CSV library rather than split(",").

Finding problems in a JTL

  • Non-HTTP response codes (Non HTTP response code: ...) usually mean timeouts or connection problems rather than a server reply.
  • Responses with success=false and code 200 came from assertion failures: read failureMessage.
  • Large gaps between Connect and Latency hint at TLS or server wait.
  • allThreads rising while throughput falls means the server is saturating: threads are queued up.
  • Sub-results (embedded resources and redirects) appear as separate rows with labels like Home-0, so filter by label when summing.

Combining and cleaning results

For distributed tests the JTLs are collected on the controller; for multiple runs, keep one file per run and name it by date and scenario. Remove warm-up rows by filtering on timeStamp: drop the first minutes before computing percentiles. After editing, regenerate the dashboard from a JTL with Tools > Generate HTML report or jmeter -g results.jtl -o report-folder (the -g option generates a report from an existing results file; the output folder must be empty).

Keep result files out of Git, compress them for archiving (CSV compresses well), and store the plan version and the date with them, so every number can be traced to a run.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which JTL column holds the response time in milliseconds?

    elapsed is the total response time; Latency is time to the first byte and Connect the connection time.
  2. 2. If you run jmeter with -l results.jtl and the file already exists, what happens?

    JMeter appends, which mixes runs. Use a fresh file name for each run.
  3. 3. Which setting saves response bodies only for failed samples?

    response_data.on_error keeps bodies for failures only, so you can diagnose them without huge files.
  4. 4. A row has responseCode 200 and success=false. What most likely caused it?

    The HTTP call succeeded but an assertion marked the sample failed.

Summary

  • A JTL is a CSV (by default) with one row per sample: time stamp, elapsed, label, response code, success, bytes, latency, connect and more.
  • Save results with -l; use a new file per run because JMeter appends.
  • Control saved fields through jmeter.save.saveservice.* properties; save response data only on error.
  • Parse a JTL with any CSV tool for custom statistics, and generate the HTML report from it with -g.
  • Keep file names, plan versions and dates together for traceability.

Next: back to the Apache JMeter track