JMeter MergeResults is not handling timeStamp label correctly (millis)

399 views Asked by At

Created two dummy sample projects as (dummy1.jmx and dummy2.jmx) and executed below commands with default settings (JMeter 5.3 default installation with all required plugins installed).

  1. #> jmeter.bat -n -t dummy1.jmx -l dummy1.csv -j dummy1-jmeter.log to execute load

    Generated report and timestamps look perfect both in dashboard and graphs

    **#> jmeter.bat -g dummy1.csv -o dummy1 -j dummy1-report-jmeter.

dummy1 html report

  1. #> jmeter.bat -n -t dummy2.jmx -l dummy2.csv -j dummy2-jmeter.log to execute load

    Generated report and timestamps look perfect both in dashboard and graphs

    #> jmeter.bat -g dummy2.csv -o dummy2 -j dummy2-report-jmeter.log

dummy2 html report

  1. Used MergeResults plugin to merge the above CSV files to a single file and generated HTML report

    #> JMeterPluginsCMD.bat --generate-csv dummy1-dummy2.csv --input-jtl merge.properties --plugin-type MergeResults

    Found merged timeStamp label is not valid and also generated report shows invalid DateTime.

    #> jmeter.bat -g dummy1-dummy2.csv -o merged -j merged-report-jmeter.log

Merged Report

Is this a bug or am I missing configuration? Even adding jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS to user.properties didn't help

merge.properties

inputJtl1=dummy1.csv
prefixLabel1=TEST1:
includeLabels1=.*
excludeLabelsl=
includeLabelRegex1=true
excludeLabelRegex1=
startOffset1=
endOffset1=


inputJtl2=dummy2.csv
prefixLabel2=TEST2:
includeLabels2=.*
excludeLabels2=
includeLabelRegex2=true
excludeLabelRegex2=
startOffset2=
endOffset2=
1

There are 1 answers

1
Dmitri T On

Unfortunately we cannot help without:

  1. Seeing your merge.properties file contents
  2. Knowing what do you expect

In the meantime I can only tell you where did this 2000-01-01 date came from:

  • It's declared here:

    private static final long REF_START_TIME = 946681200000L;
    
  • And being added to the original SampleResult timestamp here:

    res.setTimeStamp(res.getTimeStamp() - startTimeRef + REF_START_TIME);
    

I don't know whether it is a bug or it's designed to work like this (however the crazy logic of substraction of sampler start time from its timestamp is beyond my limited understanding), it's better to check at JMeter Plugins support forum

In the meantime you can use services like BM.Sense for comparing different test runs resutls