Jmeter Non GUI mode timestamp date format

8.4k views Asked by At

I am using JMeter in Non-GUI mode and able to generate the .csv and .jtl files but the timestamp in the results file is in Epoch format and I want it to be in date (yyyy/MM/dd HH:mm:ss) format.

I did go to the /bin/user.properties file and made the necessary changes, but still the report looks same as before and has the timestamp in epoch format. This is what my user.properties looks like

jmeter.save.saveservice.bytes = true
# Only available with HttpClient4
#jmeter.save.saveservice.sent_bytes=true
jmeter.save.saveservice.label = true
jmeter.save.saveservice.latency = true
jmeter.save.saveservice.response_code = true
jmeter.save.saveservice.response_message = true
jmeter.save.saveservice.successful = true
jmeter.save.saveservice.thread_counts = true
jmeter.save.saveservice.thread_name = true
jmeter.save.saveservice.time = true
jmeter.save.saveservice.connect_time = true
# the timestamp format must include the time and should include the date.
# For example the default, which is milliseconds since the epoch: 
#jmeter.save.saveservice.timestamp_format = ms
# Or the following would also be suitable
jmeter.save.saveservice.timestamp_format = yyyy/MM/dd HH:mm:ss
1

There are 1 answers

2
Dmitri T On BEST ANSWER

Double check your user.properties file, maybe you have a duplicate property somewhere and JMeter picks the one it finds first. Another assumption: try removing starting (and ending, if any) whitespace, maybe the property cannot be parsed as a valid SimpleDateFormat pattern, check jmeter.log file for any suspicious entries

As a workaround you can override the timestamp format via -J command-line argument like:

jmeter -Jjmeter.save.saveservice.timestamp_format="yyyy/MM/dd HH:mm:ss" -n -t example.jmx -l example.csv

Demo:

JMeter property override timestamp

More information on working with JMeter Properties: Apache JMeter Properties Customization Guide