tags:

views:

112

answers:

2

I have used perf4j to calulate the performance of the process. Now I want to make the graph for that file. Is it possible to make it without using google API or any other metohd that can be used

Thank You

A: 

Can you explain a bit more as to why you want to avoid Google Charting APIs (I ask since I am intrigued as to why someone would not want to do something that is very simple, elegant and FREE)?

Also there is a GraphingServlet section "Exposing Performance Graphs in a Web Application" which I think internally does the same thing.

If you still want you can take the graph data (in raw csv format) and write some helper classes to create charts using libraries like jfreechart (rich client)

Calm Storm
+1  A: 

You have a couple of options:

  1. When you use the org.perf4j.LogParser to parse your log, you can use the "--format csv" option to generate CSV output, open this up in Excel, then create a graph in Excel.
  2. As the other poster said, I'm not sure why you're against using the Google Chart API, but if you are dead set against using it, note that the JFreeChart guys provide an implementation of the Google Chart APIs called Eastwood Charts: http://www.jfree.org/eastwood/. You could just set up an eastwood server and then proxy (or just set up in a hosts file) chart.apis.google . com to your eastwood server. Alternatively, if you look at the org.perf4j.LogParser class, you can override the newMeanTimeChartGenerator and newTpsChartGenerator methods to call the GoogleChartGenerator constructor that takes the base URL.
  3. You can always create another implementation of the StatisticsChartGenerator interface and use this instead. Obviously this is the most involved option.
Alex