Increasing data points in graphite with jmeter - jmeter

I am currently expanding our jmeter load testing project to send data into a carbon/graphite/grafana server.
Jmeter seems to only send metrics once a minute and I'd like to increase that to something like one per five seconds.
I can't find any documentation that tells me how to send more metrics to graphite via jmeter.

try tweaking the value in jmeter.properties file:
#summariser.interval=30 // default is 30 seconds. remove # to uncomment and restart the JMeter.
Another variable in influxdb config:
store-interval = “10s” //default value
please refer [monitor] section in infludb.conf
The interval at which InfluxDB records statistics.
https://docs.influxdata.com/influxdb/v1.1/administration/config/#enabled-false

Related

Is there any time shift between jmeter and influxdb?

Just starting with jmeter and making some experiments I found something that looks kind of odd to me. I connected jmeter with influxdb and measured the avg. time response of one single request in a infinite loop. When I stopped the test I realized that the last time in the results csv created by jmeter is not the same as the one taken by influxdb. Specifically jmeter last measure is 13s higher than the one registered by influxdb. Any ideas on what could be happening?
I've tried to google it but haven't found any documentation or problem related
JMeter sends aggregated metrics, to wit it doesn't send each and every SampleResult but collects the results within some "window", default value is 5 seconds, controllable via backend_influxdb.send_interval JMeter Property
And metrics which are being sent are described here
You can try decreasing the 5 seconds window by amending the aforementioned backend_influxdb.send_interval JMeter property and setting it i.e. to 1000 ms so JMeter would send the data more often but it will create extra overhead so make sure that JMeter has enough headroom to operate and increasing metrics sending rate doesn't affect the overall throughput.

Jmeter Distributed Testing: Change the load throughput (requests/second) in runtime

I've set up a jmeter distributed testing setup with one master and multiple slaves.
In my test plan I'm using a ThreadGroup with 5 threads, a HTTPRequest Sampler and a Constant Throughput timer with target set as - ${__P(throughput, 100)} for all active threads in current threadgroup.
I want to change the expected request 'throughput' value in runtime for my setup.
Eg. initially the default value of requests/minute (throughput) = 100. After 1 hour of execution, I want to change the requests/minute to 6000.
Using beanshell script to change throughput only changes the value on jmeter master while there's no effect on jmeter slaves and overall requests throughput.
Thanks for any pointers and guidance.
You can consider using Beanshell Server, it will launch an endpoint where it will be listening to the commands so you would be able to change the throughput property value "on the fly"
Add the next lines to user.properties file:
beanshell.server.port=9000
beanshell.server.file=../extras/startup.bsh
Create a Beanshell file like changeThroughput.bsh in "lib" folder of your JMeter installation with the following content:
setprop("throughput", args[0]);
That's it, now you should be able to set the throughput property value during your test execution:
java -jar bshclient.jar localhost 9000 throughput 6000
Check out How to Change JMeter´s Load During Runtime article for more information.

Jmeter Find Data Ussage Per Request

I have build a jMeter test for a mobile web application. The test works perfect and i would see how much data a request cost for the mobile data bundle of the user. Is it possible ?
For downloaded data there are 2 ways to achieve this:
Approximation of downloaded data: Summary Report has
Avg. Bytes - average size of the sample response in bytes.
You could use its value to approximate how much data is downloaded by summing up # Samples x Avg. Bytes over all requests.
If you want more precision, and estimation of both uploaded and downloaded data, you can use one of the programmable listeners (BeanShell listener, BSF Listener or JSR223 Listener) and collect this stats by yourself: they all have access to SampleResult, which allows you to collect the size of the uploaded data (sampleResult.getSamplerData().length()) and the size of the downloaded data (sampleResult.getHeadersSize() + sampleResult.getBodySize()). You can then write this data into file (this is an example for BeanShell)
Add next 2 lines to user.properties file (it is located under /bin folder of your JMeter installation)
jmeter.save.saveservice.print_field_names=false
jmeter.save.saveservice.bytes=true
It will "tell" JMeter to store response size and also adds a header to generated .jtl file when you run your test in command-line non-GUI mode so you could figure out which columns stands for which metric.
You'll need to restart JMeter to pick the properties up.
You'll get something like:
So you will be able to use Excel or equivalent to sum all the "bytes" lines up and calculate the associated cost.
See Apache JMeter Properties Customization Guide for more information on what else can be controller with JMeter properties and what needs to be done to apply the changes.

To get load-time of the test in Influxdb from Jmeter

How do i get the load time of my test from jmeter into my influxdb. I am able to see data in influxdb that has been added from jmeter but how do i see the "load time" for my test case. The thing is if i run my test case 20 times, as number of threads:20, in influxdb 20 are divided based on number of threads per second, how can i change that. I want to see my load time for each test case in Influxdb-Grafana.
In Jmeter just add a Summary Report to the existing Recording Controller. Then run the testcase. You'll see a row for each request and there would be a lot of information about the test including response time (Average, Min and Max)

Understanding metrics being sent by jmeter to graphite

I have started using jmeter 2.13 which has the support of pushing data to graphite. As per the documentation :
..a.count Number of responses for sampler name
..a.min Min response time for responses of sampler name
..a.max Max response time for responses of sampler name
Is the a.count per second? or what?.
In my graphite reports, I see them hovering around a particular value. Surely it is not for the load run till now.
The min/max : What time duration are they for?
Please help.
You can trace the tcp dump (host graphiteHostNameorIPaddress and port 2003) and see that each second backendListener sends the stats to the graphite.
samplerName.a.count is the number of executions for given sampler name during that second, min and max are also for that second.

Resources