On 30/07/2009, Kenneth Cox <[email protected]> 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 <[email protected]> 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:
> [email protected]
>  For additional commands, e-mail:
> [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to