Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" for change notification.
The following page has been changed by robertpnz: http://wiki.apache.org/jakarta-jmeter/LogAnalysis The comment on the change is: jtlmin + awk stuff ------------------------------------------------------------------------------ }}} === Overview of Several Output files === + Script: attachment:jtltotals.sh.txt [[BR]] - After a test run, all the JTL output files were gathered together (20 or so files) in a bunch of subdirectories. The analysis was conducted on a Windows PC with MinGW/MinSYS and a few other tools (msys-dtk, gnu bc, gnu paste, gVim). For an overview of total vs. projected throughput, I used the shell script `jtltotals.sh` (attachment:jtltotals.sh.txt -- kludgy but hey I'm a tester not a developer!). It collates [total throughput, start time, end time, time elapsed, average response time] for each output file. + After a test run, all the JTL output files were gathered together (20 or so files) in a bunch of subdirectories. The analysis was conducted on a Windows PC with MinGW/MinSYS and a few other tools (msys-dtk, gnu bc, gnu paste, gVim). For an overview of total vs. projected throughput, I used the shell script `jtltotals.sh` (a bit kludgy but hey I'm a tester not a developer!). It collates [total throughput, start time, end time, time elapsed, average response time] for each output file. This script will produce a file 'jtl-file-totals.txt'. A sample of output is shown below. {{{ jtl-file-totals.txt @@ -212, +213 @@ }}} === Conversion of JMeter timestamps === + Script: attachment:utime2ymd.txt [[BR]] - The first field of a JTL output file is a Unix timestamp extended to milliseconds. The above script `jtltotals.sh` calls another script `utime2ymd` to convert start & end times into year-month-day.hour-min-sec (yyyymmdd.HHMMss). Usually the JTL timestamps are adjusted for your local timezone (eg. GMT plus or minus a few hours). The `utime2ymd` script uses the local timezone by default, but can also provide GMT values -- useful for converting x-thousand elapsed seconds into hhmmss. (attachment:utime2ymd.txt) Example of usage: + The first field of a JTL output file is a Unix timestamp extended to milliseconds. The above script `jtltotals.sh` calls another script `utime2ymd` to convert start & end times into year-month-day.hour-min-sec (yyyymmdd.HHMMss). Usually the JTL timestamps are adjusted for your local timezone (eg. GMT plus or minus a few hours). The `utime2ymd` script uses the local timezone by default, but can also provide GMT values -- useful for converting x-thousand elapsed seconds into hhmmss. Example of usage: {{{ $ utime2ymd Usage: utime2ymd <timestamp> [local|gmt] @@ -227, +229 @@ 19700101.010001 gmt }}} + === Excel Throughput Graph === + Script: attachment:jtlmin.sh.txt [[BR]] + JMeter's output graph is too granular to depict throughput for extended test intervals (anything from 2 to 24 hours). An Excel constraint its maximum of 65536 rows. So to produce a throughput graph, JTL files of ~100k rows should be summarized into increments of 1 minute (or 2,5,n minutes depending on requirements). + [[BR]]For each minute: throughput = count of transactions in that minute ; response time = average of 'elapsed' values in that minute. + [[BR]]The script `jtlmin.sh` summarizes large JTL files into 1 minute increments producing an OUT file that can be imported to Excel and a graph produced, as above. Example: + {{{ + $ jtlmin.sh + Usage: jtlmin.sh <filename> + Summarizes JMeter JTL output into 1-minute blocks + + $ jtlmin.sh queryBalance.jtl + Processing queryBalance.jtl + + $ ls q* + queryBalance.jtl queryBalance.jtl.OUT + + $ head queryBalance.jtl.OUT + /c/jmeter/performance/Myserver/output/queryBalance.jtl + unixtime date time thruput(tpm) response(ms) + 1160354940 2006.Oct.09 13:49 65 0 + 1160355000 2006.Oct.09 13:50 0 0 + 1160355060 2006.Oct.09 13:51 0 0 + 1160355120 2006.Oct.09 13:52 56 0 + 1160355180 2006.Oct.09 13:53 98 108 + 1160355240 2006.Oct.09 13:54 84 125 + 1160355300 2006.Oct.09 13:55 0 0 + 1160355360 2006.Oct.09 13:56 0 0 + }}} + + The core functionality in `jtlmin.sh` is this piece of awk code: + {{{ + # scan a JTL file for records in a specified interval + # and return record count & average response time. + BEGIN { + avgresponse=0; sumresponse=0; trancount=0; + } + { + if(($1 >= lastmin) && ($1 < thismin)) { + trancount++ + sumresponse += $2 + avgresponse = sumresponse / trancount + } + } + END { + printf("%d %d %d %d",lastmin,sumresponse,trancount,avgresponse); + print " ",strftime("%Y.%b.%d %H:%M",lastmin) + } + }}} + --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
