Anonymous
Anonymous

Reputation: 888

How to get date/time of request sent and response received for each thread in any listener in jmeter

I would like to have time/date of request sent to server, response received by client and latency by each thread in JMeter.

Any possibility to achieve this in non-gui mode.

Upvotes: 1

Views: 1068

Answers (2)

Dmitri T
Dmitri T

Reputation: 168122

  1. time/date of request sent to server - JMeter stores this already in form of Unix timestamp, just in case you would like to change it to another format - it's controllable via jmeter.save.saveservice.timestamp_format. It defaults to ms (time in milliseconds from the beginning of Unix epoch) however you can amend it by providing a SimpleDateFormat pattern instead
  2. response received by client - by default JMeter doesn't store this to reduce memory footprint and disk IO however you can enable storing the response by setting the following properties:

    jmeter.save.saveservice.output_format=xml
    jmeter.save.saveservice.response_data=true
    
  3. latency - JMeter stores it by default, if it doesn't - make sure to set the following property:

    jmeter.save.saveservice.latency=true
    
  4. Once you apply the above configurations run your test in command-line non-GUI mode like:

    jmeter -n -t your.test.jmx -l result.jtl
    
  5. When your test finishes you will be able to see the metrics and the response in the result.jtl file (which is basically XML file) either using your favorite XML editor or using View Results Tree listener

References:

Upvotes: 2

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34536

Those values will be in output csv you can generate adding:

-l results.csv

You can generate the html report adding:

-e -o report_folder

So you would end up with:

jmeter -n -t test.jmx -l results.csv -e -o report_folder

Upvotes: -1

Related Questions