Sunday, January 10, 2010

Aggregate Graphs in JMeter using JFreeChart (3D Bar Charts)

Now written AggregateChartVisualizer which duplicates AggregateGraph functionality in JMeter.
Sample Charts







Sample Code to be used by clients
    public static void writeAggregateChart() throws Exception {
File f = new File(JMETER_RESULT_FILE);
ResultCollector rc = new ResultCollector();
AggregateChartVisualizer v = new AggregateChartVisualizer(ConfigUtil
.getOutputGraphDir()
+ "/AggregateChart");
ResultCollectorHelper rch = new ResultCollectorHelper(rc, v);
XStreamJTLParser p = new XStreamJTLParser(f, rch);
p.parse();
v.writeOutput();
}


Source Code for the entire workspace available here

2 comments:

Anonymous said...

Thanks for the information.This very interesting and excellent work.
I have a Jmeter generating Report using Ant build.xml.I would like to add graphs to it like you did.I added the code u pasted and modified to work for my case but it gives error "content is not allowed in prolong"
are you using eclipse too?
where do I need to write Ant task and where do i need to save it?
rt now i saved all in build.xml and its not working. and xsl part i saved in xsl style file of jmeter?

i see you have your source code ,jmx jmeter file if i want to see your work in my Pc how should i copy and run to see output

Deepak Shetty said...

"content is not allowed in prolong"
Usually means you have some text in your XML that is invalid XML

I wrote up on ANT and Jmeter and offline graphs here
http://theworkaholic.blogspot.com/2010/01/jmeter-graphs-and-ant.html