Jmeter: jp@gc Graphs Generator

Problems in Jmeter and its solution

The main drawback of Jmeter is it doesn’t automatically generate attractive and meaningful graphs once we complete load testing. We use JMeterPluginsCMD Command Line Tool to generate our graphs in a shell, but this was not optimal. To overcome this drawback we use new Listener called “jp@gc Graphs Generator“ which automatically generates attractive and meaningful graphs of our result.

Advantages

  1. It can be used to make a graphical analysis of performance or to test our server/script/object behavior under heavy concurrent load.
  1. It automatically generates meaningful graphs so that we can faster analyze our test results and include the in our report.
  1. Graphs Generator Listener generates the following graphs at end of test:
  1. We can use Graph Generator listener in 2 ways:
    • to generate CSV / PNG for current test results
    • to generate CSV / PNG for existing/previous test results

JMeter Setup

Jmeter – Plugin Installation:

  • Use JMeter version >= 2.10
  • Download extras bundle (JmeterPlugins-Extras) and unzip it, copy lib/ext/JMeterPlugins-Extras.jar to <jmeter home>/lib/ext.
    • for linux: copy to /usr/share/jmeter/lib/ext
  • Restart jmeter.

NOTE: To integrate loadosophia in your project you may integrate  JMeterPlugins-Standard

Jmeter Configuration:

Edit <jmeter home>/bin/user.properties and ensure you set these properties

jmeter.save.saveservice.output_format=csv jmeter.save.saveservice.data_type=false jmeter.save.saveservice.label=true jmeter.save.saveservice.response_code=true jmeter.save.saveservice.response_data.on_error=false jmeter.save.saveservice.response_message=false jmeter.save.saveservice.assertion_results_failure_message=false jmeter.save.saveservice.successful=true jmeter.save.saveservice.thread_name=true jmeter.save.saveservice.time=true jmeter.save.saveservice.subresults=false jmeter.save.saveservice.assertions=true jmeter.save.saveservice.latency=true jmeter.save.saveservice.bytes=true jmeter.save.saveservice.hostname=true # This will enable correct graphs display # which deal with threads after reloading the results file. jmeter.save.saveservice.thread_counts=true jmeter.save.saveservice.sample_count=true jmeter.save.saveservice.timestamp_format=HH:mm:ss jmeter.save.saveservice.default_delimiter=; jmeter.save.saveservice.print_field_names=true # This is needed to ensure all results are # available when Listener runs jmeter.save.saveservice.autoflush=true

KPI (Key Perfromance Indicators) for Performance Testing

  1. Elapsed Time: JMeter measures the elapsed time from just before sending the request to just after the last response has been received. JMeter does not include the time needed to render the response.
  2. Response Time: Response time is the time taken by servers to respond the visitor’s’ request. Response time is the total time it takes from when a user makes a request until they receive a response (once user stops receiving response then response time is end). Higher the response time lower the performance and vice-versa.
  3. Latency: Latency is the subset of the Response time. It is the total time it takes from when a user makes a request until they receive a first byte of response. In a network, latency, a synonym for delay, is an expression of how much time it takes for a packet of data to get from one designated point to another.A latency is a duration between the end of the request and the beginning of the server response
  4. Throughput: In computer technology, throughput is the amount of work that a computer can do in a given time period. Higher the throughput higher the performance.
  5. Granularity: level of detail in a set of data.

Create a Test Plan

  1. For using jp@gc Graph Generator, we need to create a test plan first.
  2. Add Listener: “View Results Tree” and then “jp@gc Graphs Generator”
  3. “View Results Tree” must be before  “jp@gc Graphs Generator” as shown in fig:1.
  4. Save test plan as jmx file.

fig1

Executing from Command(Run the Plan in NON_GUI mode

  1. Enter Command:

jmeter -t Ecosweep.jmx -n -l E:\kysor-results.csv -JTEST_RESULTS_FILE=E:\kysor-             results.csv   (Ecosweep is file name).

-t means use following jmx file.

  1. -n means NON-GUI mode.
  2. -l means location of the output of the result file.

fig2

Results:

At end of test JMeter automatically generated in <jmeter home>/bin folder the following files:

  1. Transactions per Second
    Transaction: In computer programming, a transaction usually means a sequence of information exchange.
    This graph shows the number of transactions per second for each sampler. It counts for each second the number of finished transactions. It will also display the failed transactions.
    For more info:http://jmeter-plugins.org/wiki/TransactionsPerSecond/?utm_source=jmeter&utm_medium=helplink&utm_campaign=TransactionsPerSecond

fig3

Fig: Transactions per Second

2. Hits Per Second

 This graph will display the hits generated by the test plan to the server per second. Hits include child samples from transactions and embedded resources hits.

fig4

Fig: Hits per Second

  1. Response Latencies Over Time

This graph will display the response latencies during the load test. A latency is a duration between the end of the request and the beginning of the server response.

fig5

Fig: Response Latencies Over Time

  1. Response Codes per Second

This graph will display the response code per second returned during the test. Response Code means HTTP status code. eg: 200,403

fig6

Fig: Response Codes per Second

  1. Response Time Distribution

This graph will display the response time distribution of the test. The X axis shows the response times grouped by an interval, and the Y axis the number of samples which are contained in each interval.

for more info:http://jmeter-plugins.org/wiki/RespTimesDistribution/?utm_source=jmeter&utm_medium=helplink&utm_campaign=RespTimesDistribution

fig7

Fig: Response Time per Second

6.Response Times Over Time

Response time is the total amount of time it takes to respond to a request for service.This graph will display for each sampler the average response time in milliseconds.

for more info:http://jmeter-plugins.org/wiki/ResponseTimesOverTime/?utm_source=jmeter&utm_medium=helplink&utm_campaign=ResponseTimesOverTime

fig8

Fig: Response Time Over Time

7.Response Time in Percentiles

This graph will display the percentiles for the response time values. X-Axis represents a percentage, Y Axis Response time values. One point (P, Value) means for the whole scenario, P percent of the values are bellow Value ms.

for more info:http://jmeter-plugins.org/wiki/RespTimePercentiles/?utm_source=jmeter&utm_medium=helplink&utm_campaign=RespTimePercentiles

fig9

Fig: Response Time in Percentiles

  1. Active Threads Over Time Listener

Active Threads Over Time is a simple listener showing how many active threads are there in each thread group during a test run.

for more info:http://jmeter-plugins.org/wiki/ActiveThreadsOverTime/?utm_source=jmeter&utm_medium=helplink&utm_campaign=ActiveThreadsOverTime

fig10

Fig: Active Threads Over Time Listener

9.Transaction Throughput vs Threads

This listener is very similar to Response Times vs Threads, except it shows total server’s transaction throughput for active test threads. The formula for total server transaction throughput is <active threads> * 1 second / <1 thread response time>.

Example calculations:

  • when you have one thread (user) sending requests to server and server responds after 100ms, you have 1 thread * 1000ms / 100ms = 10 transactions per second.
  • when you have 10 threads sending requests to server and server responds after 100ms, you have 10 threads * 1000ms / 100ms = 100 transactions per second. This means that your server haven’t reached its resources limits and the more users work with it the more transaction it processes.
  • when you have 20 threads sending requests to server and server responds after 200ms, you have 20 threads * 1000ms / 200ms = 50 transactions per second. This means that at 20 parallel users server become responding slower and there’s some overhead to handle parallelism, e.g. database locks.

So basically, it shows the statistical maximum possible number of transactions based on number of users accessing the application. In the bellow graph, we can see for the transaction named ‘First Access’:

  • If one user alone access the application, he will have a maximum of 2 transactions per seconds
  • If two users access the application, both will have a maximum of 4 transactions per seconds
  • etc.

Fig:Transaction Throughput vs Threads

  1. Response Times vs Threads

This graph shows how Response Time changes with amount of parallel threads. Naturally, server takes longer to respond when a lot of users requests it simultaneously

fig12

Fig: Response Times vs Threads

11.Transactions per Second

This graph shows the number of transactions per second for each sampler. It counts for each seconds the number of finished transactions.

fig13

Fig:Transactions per Second

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


for using csv data set config visit:http://community.blazemeter.com/knowledgebase/articles/65138-using-csv-data-set-config

Other links:

Use of English Tense

Principle of automation

When to automate?

Goal Settings

Advertisements

7 thoughts on “Jmeter: jp@gc Graphs Generator

      • Shai says:

        Hi kysor,
        What if it doesn’t work for me?
        I did all the configuration as above, but I don’t have the graph created.
        Shai

      • Shai says:

        Hi Kysor,
        I used the command line:
        >C:\apache-jmeter-2.9\bin\jmeter.bat -n -t C:\Tests\SM_Web_Load_67_users.jmx -l C:\Load_Results\67Users.csv -JTEST_RESULTS_FILE=C:\Load_Results\67Users.csv
        And configured the jp@gc – Graphs Generator as follows:
        — Output Configuration —
        Output Folder: C:\Load_Results\
        Jmeter Results file: C:\Load_Results\67Users.csv
        exportMode: PNG
        filePrefix: “GEOT-”
        — Graphs configuration —
        width: 800
        height: 600
        markers: Undefined
        zeroing lines: False
        gradient BG: True
        Prevent outliers on distribution graph: False
        Use relative X: False
        Auto Scale: False
        Limit number of points in row: 150
        Force Y axis:
        Granulation: 1000
        ** all the rest are default.

        Is there anything I’m missing?
        Shai

      • Hello Sahi, I suggest you to integrate your script with LoadosophiaUploader or blazemeter. Rather than using multiple graph you can integrate and get better graph.

  1. Suman says:

    Nice Post, I know pain in creating such a document , I really appriciate the efforts .. Any Idea How to make this work in gradle jmeter .

    what dependencies must added.

Leave your feedback...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s