4

I have a JMeter project with multiple GET and POST requests and assertions for these. I use Aggregate results and View results tree listeners, but none of these can store results on hourly basis. I tried JMeterPlugins-Standard and JMeterPlugins-Extras packages and jp@gc - Graphs Generator listener, but all of them use aggregated data instead of hourly data. So I would like to get number of successful and failed requests/assertions per hour, maybe a bar chart would be most suitable for this purpose.

plaidshirt
  • 3,973
  • 12
  • 55
  • 140
  • You can try to use [SmartMeter's](https://dzone.com/articles/save-yourself-some-work-and-get-a-great-load-test) [Report Generator](https://www.smartmeter.io/documentation#toc-et-sm---report-generator). You can setup start and stop offset. It works with jmeter results. – klingac Oct 02 '17 at 11:30

4 Answers4

2

I'm going to suggest a non-conventional design-level solution: name your samplers dynamically with hour (or date and hour), so that each hour the name will change, and thus they will appear in different category, i.e.:

enter image description here

The code for such name is:

${__time(dd:hh,)} the rest of sampler name

Such sampler will appear in the following way in Aggregate Report (here I simulated it with minutes/seconds, but same will happen with days/hours, just on larger scale):

enter image description here

Pros and cons of such approach:

  • Simple, you can aggregate anything by hour, minute, or any other time slice while test is running, and not by analysis after execution.

  • Not listener-dependant, can be used with pretty much any listener or visualizer

  • If you want to also have overall stats, it will require to sum up every sub-category. So it alters data, but in the way that it can still can be added back to original relatively easy.

  • Calculating __time before every sampler will not be unnoticed completely from performance perspective, but I don't think it will add visible overhead to a script.

  • You could get the same data by properly aggregating JTL or CSV (whichever you use) after execution, so it doesn't provide you with anything that is not possible to achieve using standard methods

  • Script needs altering to make this happen. if you have 100s of samplers, it's going to take a while. And if you want to change back...

Kiril S.
  • 8,572
  • 5
  • 34
  • 56
1

You might want to use Filter Results Tool which has --start-offset and --end-offset parameters, you can "cut" your results file into "interesting" pieces and plot them according to your requirements.

You can install Filter Results Tool using JMeter Plugins Manager

JMeter Filter Results Tool


Also be aware that according to JMeter Best Practices you should

  • Use as few Listeners as possible; if using the -l flag as above they can all be deleted or disabled.
  • Don't use "View Results Tree" or "View Results in Table" listeners during the load test, use them only during scripting phase to debug your scripts.

You can get whatever information you need from the .jtl results file, you can specify test results location via -l command-line argument

Kiril S.
  • 8,572
  • 5
  • 34
  • 56
Dmitri T
  • 119,313
  • 3
  • 56
  • 104
1

To get summarized results per hour add to your test plan Generate Summary Results:

Generates a summary of the test run so far to the log file and/or standard output

Update interval in jmeter.properties to your needs ,1 hour, 3600 seconds:

 summariser.interval=3600 

You will get summary per hour of your requests.

user7294900
  • 47,183
  • 17
  • 74
  • 157
1

You can try with Jmeter backend Listener. It has integration with graphite and Influxdb. After storing the results in these time series database you can display the result in Grafana dashboard. Grafana has its own filtering of showing the results in hourly, monthly, daily basis and so on.

bsd007
  • 328
  • 2
  • 8