tag:blogger.com,1999:blog-354819322024-02-28T17:10:07.501+00:00JChavNews and documentation for the JChav project — JMeter Chart History And Visualisation.Gareth Floodgatehttp://www.blogger.com/profile/07380159760082874911noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-35481932.post-62890259898141024252009-07-10T16:51:00.004+01:002009-07-10T17:00:51.369+01:00JChav 1.1.2 ReleasedThese changes have been released as part of JChav 1.1.2:
<ul>
<li> Fixed <a href="http://code.google.com/p/jchav/issues/detail?id=20">issue 20</a>: support for sample and httpSample output from JMeter.</li>
<li> Fixed <a href="http://code.google.com/p/jchav/issues/detail?id=23">issue 23</a>: support for <fileset> in the JChav Ant task.</li>
<li> Fixed <a href="http://code.google.com/p/jchav/issues/detail?id=24">issue 24</a>: improved CSS to avoid image cropping (thank you paul.blizzard).</li>
<li> Findbugs warnings fixed.</li>
<li> log4j configuration included. </li>
<li>Tested with JMeter 2.3.4</li>
</ul>
Download: <a href="http://jchav.googlecode.com/files/jchav-1.1.2.zip">jchav-1.1.2.zip</a> and check out the <a href="http://jchav.blogspot.com/2006/10/download-quick-start.html">quick start guide</a>.
As a consequence of adding support for Ant's fileset, we have deprecated the "srcdir" attribute in the JChav ant task. You can migrate your Ant scripts by replacing...
<pre><jchav srcdir="SOME_DIR" ... /></pre>
with....
<pre>
<jchav ... >
<fileset dir="SOME_DIR" includes="**/*.xml" />
</jchav>
</pre>Anonymousnoreply@blogger.com0tag:blogger.com,1999:blog-35481932.post-12526644967962076262007-12-22T16:45:00.000+00:002007-12-22T16:49:35.533+00:00JChav 1.1.1 ReleasedJChav 1.1.1 is now available, and includes the following changes:
<ul>
<li>Fixed the Digg example JMeter script by adding a User-Agent header.</li>
<li>We can now read the HTTP status code from JMeter results, although how we use this value to show error status codes is up for discussion.</li>
<li>Fix for <a href="http://code.google.com/p/jchav/issues/detail?id=18&can=1">issue 18</a> and <a href="http://code.google.com/p/jchav/issues/detail?id=22&can=1">22</a>: the length of the filenames created by JChav could cause a problem for some operating systems. The filesnames are now MD5 hashes, which should resolve this issue.</li>
<li>Documentation enhancements.</li>
<lI>Tested with JMeter 2.2 and 2.3.1 under JDK 1.5</li>
</ul>
Download: <a href="http://jchav.googlecode.com/files/jchav-1.1.1.zip">jchav-1.1.1.zip</a>.Anonymousnoreply@blogger.com0tag:blogger.com,1999:blog-35481932.post-41759468257300821112007-05-25T11:07:00.000+01:002007-05-25T11:19:06.528+01:00Google London Open Source JamHere are the slides from the presentation we did on JChav at the Google <a href="http://www.red-bean.com/ospowiki/LondonOpenSourceJam03">Open Source Jam</a> in London on 24 May 2007: <a href="http://jchav.googlecode.com/files/jam-london-2007.pdf">jam-london-2007.pdf</a>. I'm not sure how much sense they'll make by themselves, but perhaps some one will find them useful.
<p><img src="http://farm1.static.flickr.com/226/512827203_ebe6d392fd_m.jpg" width="240" height="160" alt="During JChav presentation" /></p>
Photo by <a href="http://flickr.com/photos/adewale_oshineye/">adewale_oshineye</a>Anonymousnoreply@blogger.com0tag:blogger.com,1999:blog-35481932.post-1161338217276099192006-10-20T10:43:00.000+01:002006-10-20T14:59:28.176+01:00JChav 1.1.0 ReleasedJChav 1.1.0 is now available, featuring:
<ul><li> The y-axis (response time) is now uniform across all charts by default. This means when you look at the summary page you're comparing like with like. This option can be controlled by the Ant option of <code>uniformyaxis="true|false"</code>.</li>
<li>Bug fix: the max value for some tests was not set if the first value in the results was both the min and max values. This showed up as a chart with a huge y-axis scale.</li>
<li> Minor chart changes: the thumbnail graphs now do not show the (unreadable) x-axis labels, saving a bit of screen space.</li>
<li> A Maven 2 plugin has been contributed (thanks to Tim McCune for this). You will also want to check out his <a href="http://wiki.apache.org/jakarta-jmeter/JMeterMavenPlugin">JMeter Maven plugin</a>.</li></ul>
We're not (yet) regular Maven users, so apologies if we've messed it all up and undone Tim's good work. The instructions that seem to work for us: download the 1.1.0 ZIP release; cd into the <code>etc</code> folder; run <code>mvn -f maven-jchav-plugin-pom.xml install</code>.
<p>Download: <a href="http://jchav.googlecode.com/svn/trunk/releases/jchav-1.1.0.zip">jchav-1.1.0.zip</a></p>Anonymousnoreply@blogger.com4tag:blogger.com,1999:blog-35481932.post-1160126704611353372006-10-06T10:23:00.000+01:002006-10-09T20:23:50.546+01:00About JChavJChav is a way to see the change in performance of your web application
over time, by running a benchmark test for each build you produce.
<p>
<img style="display:block; margin:0px auto 10px; text-align:center;" src="http://photos1.blogger.com/blogger/3665/21/1600/jchav.png" border="0" width="710" height="383" alt="Example of the JChav reports output." /></p>
<p><b>How does it work?</b></p>
<ul>
<li> You build and deploy your application. </li>
<li> You write a JMeter test plan to exercise your application.</li>
<li> From Ant, you run the JMeter test plan and log the results, using the Ant JMeter task.</li>
<li> JChav reads all the JMeter logs from each of your runs (one per build), and produces a set
of charts for each test in each run.
<li> Each time you deploy, re-run the JMeter tests and the JChav tool to update
the charts to show the change in performance.</li>
</ul>
By running this often you can see the effect of code change on your application performance.
<p><b>Getting started</b></p>
<p>JChav is made available under the <a href="http://jchav.googlecode.com/svn/trunk/docs/LICENSE">Apache 2.0 license</a>.</p>
<ul>
<li> Take a look at our <a href="http://jchav.blogspot.com/2006/10/download-quick-start.html">quick start guide</a>. </li>
<li> View the <a href="http://jchav.blogspot.com/2006/10/example-diggcom.html">detailed configuration examples</a>.</li>
<li> Browse the source and contrubte at <a href="http://code.google.com/p/jchav">Google Code</a>.</li>
</ul>
<p><b>Live Demo</b></p>
<p>If you would like to see what the reports look like we have a live demo of the site available <a href="http://www.cognitran.com/jchav/diggjchavresults/index.html">here</a>. It shows a series of threads accessing the <a href="http://www.digg.com">www.digg.com</a> site. The <a href="http://jchav.blogspot.com/2006/10/example-diggcom.html">example</a> section below shows the scripts used to produce these results.
</p>Anonymousnoreply@blogger.com1tag:blogger.com,1999:blog-35481932.post-1160128999436173332006-10-05T10:45:00.000+01:002007-12-22T00:03:49.391+00:00Download & Quick Start<ul>
<lI> JChav needs Java 1.5 (or later), which can be downloaded from <a href="http://java.com">java.com</a>. </li> <br />
<li> Download and install Apache <a href="http://ant.apache.org/">Ant</a>. </li> <br />
<li> Download and install <a href="http://jakarta.apache.org/jmeter/">JMeter</a>. </li>
<p>If you've not used Ant or JMeter before, check out the <a href="http://jchav.blogspot.com/2006/10/example-diggcom.html">detailed example</a> we provide.</p>
<li> Download and extract the latest release of JChav: <a href="http://code.google.com/p/jchav/downloads/list">from the Google Code site</a>. </li> <br />
<li> Read on to configure JChav and run against your own site. However, if you'd like to run the example we supply, which runs a few tests against the Digg.com web site, to can: in the <code>docs/examples</code> directory of JChav, edit the two lines in <code>build.properties</code> to let JChav know where it's installed and where to find Jmeter. Then, from the <code>docs/exampes</code> directory, run <code>ant -f build-example.xml</code>. It'll take a while to run as it samples the Digg.com web site. When it's over open <code>digjchavresults/index.html</code> in your web browser. </li> <br/>
<li>Modify or create an Ant build file to run your JMeter test and record the results. Also set up the location of JMeter, where you'd like the results to be written, etc. Here's an example, which you can use by modifying the value of various properties:</li>
<pre>
<target name="init">
<!-- Produce a build id. If using a continuous build
process inherit the build. id from that" -->
<tstamp>
<format property="build.id" pattern="dMMhhmmss" locale="en"/>
</tstamp>
<property description="The location of the install of JMeter"
name="jmeter.install.dir" value="DIRECTORY_TO/jakarta-jmeter-2.2" />
<property description="The directory containing the jchav jars"
name="jchav.libs.dir" value="DIRECTORY_TO/jchav" />
<property description="The JMeter test plan script we want to run"
name="jmeter.testplan" value="YOUR_PLAN.jmx" />
<property description="The location to store the per run files"
name="jmeter.result.dir" value="jmeter-results" />
<property description="The resulting file location, make sure this is unique for each build"
name="jmeter.result.file" value="${jmeter.result.dir}/result-${build.id}.xml" />
<property description="The location to generate the html and charts to. "
name="jchav.result.dir" value="jchav-results" />
</target>
<target name="run-jmeter" depends="init"
description="Execute the JMeter test plan, recording the results to a file.">
<taskdef name="jmeter"
classpath="${jmeter.install.dir}/extras/ant-jmeter.jar"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"/>
<jmeter
jmeterhome="${jmeter.install.dir}"
testplan="${jmeter.testplan}"
resultlog="${jmeter.result.file}">
<property name="jmeter.save.saveservice.output_format" value="xml"/>
</jmeter>
</target>
</pre>
<li> Run your ant task to gather statistics: <code>ant run-jmeter</code>. Based on the simple example about you'll end up with an XML file in the output directory of <code>jmeter-results</code>. </li> <br />
<li> Modify your Ant build file to run JChav on the JMeter results. Here's an example: </li>
<pre>
<target name="run-jchav" depends="init"
description="Produce JChav report from the JMeter results">
<taskdef name="jchav" classname="com.googlecode.jchav.ant.JChavTask">
<classpath>
<fileset dir="${jchav.libs.dir}/">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
<jchav srcdir="${jmeter.result.dir}" destdir="${jchav.result.dir}"/>
</target>
</pre>
<li> Run the ant task, e.g., <code>ant jchav</code>. This will create an output directory such as <code>chav-results</code>. Open <code>index.html</code> to see your reports.</li> <br />
<li>Problems? Issues? Fixes? Suggestions? Post them on the project <a href="http://code.google.com/p/jchav/issues/list">issue tracker.</a></li>
</ul>
Thanks for trying JChav.Anonymousnoreply@blogger.com2tag:blogger.com,1999:blog-35481932.post-1161359941471991382006-10-04T16:56:00.000+01:002006-10-20T17:13:50.260+01:00Continuous Performance Monitoring With JChavWe think you will get the most benefit from using JChav alongside a continuous integration tool like <a href="http://cruisecontrol.net/">CruiseControl</a> or <a href="http://maven.apache.org/continuum/">Continuum</a>.
By integrating JChav into the automated build/test/deploy cycle you get the additional benefit of being able to see if the changes made are having a positive or negative effect on performance. Those changes are immediately available to all interested parties.
The typical build arrangement in ant/cruisecontrol we use is as follows :
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4500/140/1600/continuous.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/4500/140/320/continuous.jpg" alt="" border="0" /></a>
So as soon as a developer commits a change to the source code repository an automated build is triggered. The normal ant build is run including any checkstyle constraints, JUnit tests etc. The build also deploys the application before triggering the JMeter scripts and performance chart generation through JChav. The notification via email to all the build participants contains a link to the generated charts.
Bringing performance monitoring into every cycle in a simple way stops any nasty suprises at a later date.
Trying to add performance testing to a large establish application looks unsurmountable, but ... one test at a time, seeing the graph going the right way will help to motivate you to adding more.Paul Goulbournhttp://www.blogger.com/profile/03128751854785304048noreply@blogger.com0tag:blogger.com,1999:blog-35481932.post-1160136564149659122006-10-04T13:07:00.000+01:002006-10-09T18:39:03.336+01:00Screenshots<p><b>The first screen: showing thubnails of all the reports, and each thumbnail links to the details for the report.</b></p>
<p>
<a href="http://photos1.blogger.com/blogger/3665/21/1600/summary.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/3665/21/320/summary.png" border="0" alt="" /></a>
</p>
<p><b>The details screen: Showing the full report for a single test and how the test ran for different builds.</b></p>
<p>
<a href="http://photos1.blogger.com/blogger/3665/21/1600/video.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/3665/21/320/video.png" border="0" alt="" /></a>
</p>Anonymousnoreply@blogger.com0tag:blogger.com,1999:blog-35481932.post-1160135303729231792006-10-04T12:41:00.000+01:002006-10-10T10:14:26.813+01:00Example - digg.comHere's an example of running a JChav, using <a href="http://digg.com">digg.com</a> as the subject of the test.
<p><b>Produce A JMeter Script</b></p>
<p>
The first step is to produce a JMeter script that will exercise the site you wish to test.
The Jakarta <a href="http://jakarta.apache.org/jmeter/">JMeter</a> web pages describe how to do this in depth.
</p>
<p>
JChav produces the top level set of images based upon the labels that you put into the JMeter configuration file.
So where possible give your JMeter tasks meaningful names. This is especially important if you are using the http proxy tool built into JMeter to make test generation easy.
JChav will do its best to turn URLs into something meaningful, but if you take the trouble to set the name on the task the resulting pages will be better.
Make sure that the test plan you have created is running as you expect it to inside the JMeter workbench. When you are happy with this script save the script as a jmx file.
</p>
<p>
We have included a small example called <a href="http://jchav.googlecode.com/svn/trunk/docs/examples/digwalk.jmx">digwalk.jmx</a> which performs a series of simple calls to the <a href="http://digg.com">Digg</a> web site.
</p>
<p>If you'd rather jump in a use JMeter to test your own site, we've provided a <a href="http://jchav.googlecode.com/svn/trunk/docs/examples/localhost.jmx">localhost.jmx</a> JMeter test which simply requests the home page of a site running on your localhost on port 80. It's a template to get you up and running quickly. Also check out the examples that ship with JMeter in their <code>docs/demos/</code> directory. </p>
<p><b>Running our script from ant</b></p>
<p>JChav includes <a href="http://jchav.googlecode.com/svn/trunk/docs/examples/build-example.xml">build-example.xml</a> which is an Ant build file set up to run the digg.com tests and produce a JChav report. If you go into the <code>jchav/docs/examples</code> you'll see it there. Run it with <code>ant -f build-example.xml</code>. </p>
<p>If you're logged in to your computer as the user <code>jimbo</code> you can customize the build for your machine by creating a file called <code>jchav/docs/examples/jimbo.properties</code> which can contain something along these lines:</p>
<pre>
jmeter.install.dir=/Applications/jakarta-jmeter-2.2
jchav.libs.dir=/Users/jimbo/jchav-1_0_0
</pre>
<p>
Alternatively, if you don't want to create a <code><i>user</i>.properties</code> file, go into the <code>docs/examples</code> directory edit the two lines in <code>build.properties</code> to let JChav know where it's installed and where to find Jmeter. Then, from the <code>docs/exampes</code> directory, run <code>ant -f build-example.xml</code>. It'll take a while to run as it samples the Digg.com web site. When it's over open <code>digjchavresults/index.html</code> in your web browser.
</p>
<p><b>How the script works</b></p>
<p>
The good folks over at Programmer Planet have produced an ant task for running JMeter called <a href="http://www.programmerplanet.org/pages/projects/jmeter-ant-task.php">Jmeter Ant Task</a>, which is included in recent JMeter distributions in the <code>jmeter/extras</code> folder.
</p>
<p>
The job of this ant task is to run our tests and produce an output file containing the results. But it is important that we make sure that we produce a different output file each time we perform our tests.
By default the task appends information to one file, but we want want file per run so that we can judge if the changes we have made to the software have improved or degraded performance over time.
</p>
<p>
To do this simply create a unique build id for each build performed. If you are using a continuous integration tool such as <a href="http://www.cruisecontrol.net">CruiseControl</a> then use the build id for the build, otherwise use something like a timestamp.
eg.
</p>
<pre>
<tstamp>
<format property="build.id" pattern="dMMhhmmss" locale="en"/>
</tstamp>
<jmeter
jmeterhome="c:\jakarta-jmeter-1.8.1"
testplan="${basedir}/test/scripts/digwalk.jmx"
resultlog="${basedir}/test/results/digresult{$build.id}.xml"
/>
</pre>
<p>
Everytime we run the jmeter target we will create a file in the <code>${basedir}/test/results/</code> directory. This is the directory that we pass to the JChav task to produce our performance graphs.
</p>
<p><b>Adding JChav to the build</b></p>
<p>Initially you need to ensure that the jchav task is available for your ant build. The following taskdef will import the task :
</p>
<pre>
<taskdef name="jchav" classname="com.googlecode.jchav.ant.JChavTask">
<classpath>
<fileset dir="${jchav.libs.dir}/">
<include name="**/*.jar"/>
</fileset>
</classpath>
</taskdef>
</pre>
<p>
Once the task is available you simply need to add the task to the build. It requires two attributes. The first is <b>srcdir</b> which is the directory that contains all the logs from the JMeter runs.i.e. the directory you chose to write the JMeter output to from the above example.
The second parameter is <b>destdir</b> which is the output directory for the images and html produced by the task.
</p>
<pre>
<jchav srcdir="${basedir}/test/results/" destdir="${basedir}/test/chavoutput/"
reporttitle="Digg Example Walk"/>
</pre>Anonymousnoreply@blogger.com0tag:blogger.com,1999:blog-35481932.post-1160471614498879412006-10-04T10:12:00.000+01:002006-10-20T14:58:10.410+01:00JChav Ant Task Details<h2><a name="get">JChav</a></h2>
<h3>Description</h3>
<p>Generate a series of charts based upon the stored data from a series of <a href="http://javarta.apache.org/jmeter/" jmeter=""></a> tests. The charts show the performance over time of each page tested in the script.
</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tbody><tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">srcdir</td>
<td valign="top">the location of the JMeter XML files to process.</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
<td valign="top">destdir</td>
<td valign="top">the location to produce the html results/images.</td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
<td valign="top">reporttitle</td>
<td valign="top">The page title for the produced reports.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">uniformyaxis</td>
<td valign="top">If true, all charts have the same y-axis, computed from the largest and smallest
values seen in the dataset. Set to false to have each chart have it's own range. Default is true. <i>Since 1.1.0</i>. </td>
<td align="center" valign="top">No</td>
</tr>
</tbody></table>
<h3>Examples</h3>
<pre>
<jchav srcdir="${basedir}/test/results/"
destdir="${basedir}/test/chavoutput/"
reporttitle="Digg Example Walk"
/>
</pre>
<p>
Runs the report setting the title page to be "Digg Example Walk".
</p>
<hr />Paul Goulbournhttp://www.blogger.com/profile/03128751854785304048noreply@blogger.com0tag:blogger.com,1999:blog-35481932.post-1159950586770150342006-10-04T09:28:00.000+01:002006-10-04T09:29:46.776+01:00Show me the codeIt's at <a href="http://code.google.com/p/jchav/">http://code.google.com/p/jchav/</a>.Anonymousnoreply@blogger.com0