How to exclude warmup time from JMeter summary?

家住魔仙堡 提交于 2019-12-14 04:25:37

问题


I have a simple JMeter throughput test that spawns 20 threads and each thread executes a simple SQL query against a database. I have set a ramp up time of 10 seconds and a total test time of 70 seconds.

When I execute the test in non-GUI mode I see the following summary output:

summary +      1 in   0.1s =    7.4/s Avg:   135 Min:   135 Max:   135 Err:     0 (0.00%) Active: 1 Started: 1 Finished: 0
summary + 137501 in  28.5s = 4831.0/s Avg:     3 Min:     1 Max:   614 Err:     0 (0.00%) Active: 20 Started: 20 Finished: 0
summary = 137502 in    29s = 4796.9/s Avg:     3 Min:     1 Max:   614 Err:     0 (0.00%)
summary + 171000 in    30s = 5703.8/s Avg:     3 Min:     1 Max:   519 Err:     0 (0.00%) Active: 20 Started: 20 Finished: 0
summary = 308502 in    59s = 5260.8/s Avg:     3 Min:     1 Max:   614 Err:     0 (0.00%)
summary +  61016 in  11.5s = 5309.0/s Avg:     3 Min:     1 Max:   518 Err:     0 (0.00%) Active: 0 Started: 20 Finished: 20
summary = 369518 in  70.1s = 5268.9/s Avg:     3 Min:     1 Max:   614 Err:     0 (0.00%)

As you can see that the throughput is low in the first 30 seconds but picks up later. I understand that this could be due to the threads starting and other system components warming up.

Is there a way I can exclude "X" seconds worth of starting numbers from the final calculation. I have used some custom performance tests where I always excluded the first "X" seconds until the system reached a steady state before measuring the output.

Is there anyway I can do that in JMeter?


回答1:


You can use jmeter-plugins to generate graphs

  • http://jmeter-plugins.org/wiki/GraphsGeneratorListener/

And fill in start offset field.

Read this for using generation:

  • https://www.ubik-ingenierie.com/blog/automatically-generating-nice-graphs-at-end-of-your-load-test-with-apache-jmeter-and-jmeter-plugins/



回答2:


Option 1:

JMeter result file is basically CSV file having the following format:

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,bytes,grpThreads,allThreads,Latency

1440671556283,1799,HTTP Request,200,OK,Thread Group 1-1,text,true,1591,1,1,1798

where first column is sample start time (in milliseconds since Unix Time)

If you need to omit first 30 seconds add 30000 to the first sampler timestamp, locate the closest row and delete all the rows from 1st to that one.

Option 2:

You can use Synchronizing Timer to ensure that load starts with 20 threads from the early beginning.



来源:https://stackoverflow.com/questions/32237837/how-to-exclude-warmup-time-from-jmeter-summary

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!