You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jantien Sessink <ja...@gx.nl> on 2009/07/29 11:40:59 UTC
converting the .jtl to a summary report in non-gui mode
Hello,
We are using JMeter for performance testing for quite some time, but always in GUI mode. We now want to run these tests in a batch at night and have a result report in the morning.
The problem is that after running the tests we get a lot of .jtl files that have to be opened in the Summary Report Listener of the JMeter GUI one by one, then saved to .csv and then imported in MS Excel for further analyses. This is very time consuming and we would like to automated that step. Is it possible to convert the .jtl output to a summary report in .csv format without using the GUI? I hope someone can help me, since there doesn't seem to be anything on the web about this problem.
Kind regards,
Jantien
Re: converting the .jtl to a summary report in non-gui mode
Posted by Deepak Shetty <sh...@gmail.com>.
Hi
Write a custom XSLT, there are two sample XSLT files that ship with jmeter.
(XSLT can generate CSV files )
In your build script
<jmeter
jmeterhome=".."
testplan="${run.test.plan}"
resultlog="${report.dir}/${run.test.report}-${run.env}-${DSTAMP}${TSTAMP}.jtl">
<property name="jmeter.save.saveservice.output_format" value="xml"/>
</jmeter>
<xslt
in="${report.dir}/${run.test.report}-${run.env}-${DSTAMP}${TSTAMP}.jtl"
out="${report.dir}/${run.test.report}-${run.env}-${DSTAMP}${TSTAMP}.html"
style="${styles.dir}/${xsl.file}"/>
regards
deepak
On Wed, Jul 29, 2009 at 2:40 AM, Jantien Sessink <ja...@gx.nl> wrote:
> Hello,
>
> We are using JMeter for performance testing for quite some time, but always
> in GUI mode. We now want to run these tests in a batch at night and have a
> result report in the morning.
> The problem is that after running the tests we get a lot of .jtl files that
> have to be opened in the Summary Report Listener of the JMeter GUI one by
> one, then saved to .csv and then imported in MS Excel for further analyses.
> This is very time consuming and we would like to automated that step. Is it
> possible to convert the .jtl output to a summary report in .csv format
> without using the GUI? I hope someone can help me, since there doesn't seem
> to be anything on the web about this problem.
>
> Kind regards,
> Jantien
>
Re: converting the .jtl to a summary report in non-gui mode
Posted by Kenneth Cox <ke...@gmail.com>.
> On 30/07/2009, Kenneth Cox <ke...@gmail.com> wrote:
> I wrote a short script to do this
On Thu, 30 Jul 2009 12:50:12 -0400, sebb <se...@gmail.com> wrote:
> Or add it to the JMeter Wiki ...
Good suggestion. I put it on the wiki (search for "jtlsummary"):
http://wiki.apache.org/jakarta-jmeter/LogAnalysis
Regards,
Ken
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: converting the .jtl to a summary report in non-gui mode
Posted by sebb <se...@gmail.com>.
On 30/07/2009, Kenneth Cox <ke...@gmail.com> wrote:
> I wrote a short script to do this which takes a CSV format JTL file and
> summarizes it in a similar way to the (slow) aggregate report listener. It
> uses a local postgres instance to import and summarize the CSV, and it runs
> very fast even on huge JTL files. If this fits your needs feel free to use
> and share. It's short; I'll paste it below. If anybody uses this script
> and enhances it to print 90th percentile, please share again.
Or add it to the JMeter Wiki ...
[Much easier to find later]
Thanks!
> Regards,
> Ken
>
>
> On Wed, 29 Jul 2009 05:40:59 -0400, Jantien Sessink <ja...@gx.nl> wrote:
>
> > The problem is that after running the tests we get a lot of .jtl files
> that have to be opened in the Summary Report Listener of the JMeter GUI one
> by one, then saved to .csv and then imported in MS Excel for further
> analyses. This is very time consuming and we would like to automated that
> step. Is it possible to convert the .jtl output to a summary report in .csv
> format without using the GUI?
> >
>
> ---------------------------jtlsummary.sh------------------------------------
> #!/bin/sh -
> # summarize results in one or more .jtl (csv) files
> #
> # by kenstir 2009-07-01
>
> # could be an option
> dbname=$LOGNAME
>
> # build sql here
> tmpfile=/tmp/jtlsummary.$$.sql
>
> > $tmpfile
> >
>
> set -e
>
> cat >>$tmpfile <<EOF
> create temp table results (timeStamp bigint,elapsed int,label
> text,responseCode text,responseMessage text,threadName text,dataType
> text,success boolean,bytes int,Latency int);
> EOF
>
> for csvfile in "$@"; do
> case "$csvfile" in
> /*) ;;
> *) csvfile="$PWD/$csvfile";;
> esac
> cat >>$tmpfile <<EOF
> copy results from '$csvfile' csv header;
> EOF
> done
>
> cat >>$tmpfile <<EOF
> --analyze results;
> create temp table agg as
> select label
> ,count(*)
> ,avg(elapsed)
> ,min(elapsed)
> ,max(elapsed)
> from results
> group by label
> order by label;
> copy agg to stdout csv header;
> EOF
>
> psql -q -f $tmpfile
> rm $tmpfile
> -------------------------------------end---------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: converting the .jtl to a summary report in non-gui mode
Posted by Kenneth Cox <ke...@gmail.com>.
I wrote a short script to do this which takes a CSV format JTL file and
summarizes it in a similar way to the (slow) aggregate report listener.
It uses a local postgres instance to import and summarize the CSV, and it
runs very fast even on huge JTL files. If this fits your needs feel free
to use and share. It's short; I'll paste it below. If anybody uses this
script and enhances it to print 90th percentile, please share again.
Regards,
Ken
On Wed, 29 Jul 2009 05:40:59 -0400, Jantien Sessink <ja...@gx.nl> wrote:
> The problem is that after running the tests we get a lot of .jtl files
> that have to be opened in the Summary Report Listener of the JMeter GUI
> one by one, then saved to .csv and then imported in MS Excel for further
> analyses. This is very time consuming and we would like to automated
> that step. Is it possible to convert the .jtl output to a summary report
> in .csv format without using the GUI?
---------------------------jtlsummary.sh------------------------------------
#!/bin/sh -
# summarize results in one or more .jtl (csv) files
#
# by kenstir 2009-07-01
# could be an option
dbname=$LOGNAME
# build sql here
tmpfile=/tmp/jtlsummary.$$.sql
> $tmpfile
set -e
cat >>$tmpfile <<EOF
create temp table results (timeStamp bigint,elapsed int,label
text,responseCode text,responseMessage text,threadName text,dataType
text,success boolean,bytes int,Latency int);
EOF
for csvfile in "$@"; do
case "$csvfile" in
/*) ;;
*) csvfile="$PWD/$csvfile";;
esac
cat >>$tmpfile <<EOF
copy results from '$csvfile' csv header;
EOF
done
cat >>$tmpfile <<EOF
--analyze results;
create temp table agg as
select label
,count(*)
,avg(elapsed)
,min(elapsed)
,max(elapsed)
from results
group by label
order by label;
copy agg to stdout csv header;
EOF
psql -q -f $tmpfile
rm $tmpfile
-------------------------------------end---------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org