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:
copyedit, re-jig headings

------------------------------------------------------------------------------
  attachment:scripts_jmeter.zip
  
  
- == Testing a High Volume Webservice: Simple Data Writer, Bash scripts & Excel 
Graphs ==
+ = Testing a High Volume Webservice: Simple Data Writer, Bash scripts & Excel 
Graphs =
- For a telecoms project, JMeter was used to test a new high-availability 
integration layer, exposed to a few internal clients (see also 
[:../UserManual/BuildWSTest:BuildWSTest]). Several instances of JMeter 
represented the different clients and varying load profiles. The default JMeter 
XML output is too verbose, and the files grew too enormous, so the '''Simple 
Data Writer''' was used to produce much friendlier CSV results files. 
+ JMeter was used to test a new high-availability webservice/integration layer, 
exposed to a few internal clients (see also 
[:../UserManual/BuildWSTest:BuildWSTest]). Several instances of JMeter 
represented the different clients and varying load profiles. The main problems 
were:
+  *The default JMeter XML output is too verbose, and the files grew too 
enormous, so the '''Simple Data Writer''' was used to produce much friendlier 
CSV results files. 
- I wanted to show throughput & response times in blocks of 1 minute; JMeter's 
inbuilt Graph function was not sufficient to process the volume of data. An 
example of the type of graph required follows. The reader will see that the 
JMeter test plan produced variations in load (normal, high & spike), and the 
response times were quite well-behaved. If the integration layer was performing 
poorly, the graph would show inconsistent throughput and fluctuating response 
times. 
+  *JMeter's inbuilt Graph function was not sufficient to process the volume of 
data. An example of the type of graph required follows. The reader will see 
that the JMeter test plan produced variations in load (normal, high & spike), 
and the response times were quite well-behaved. If the integration layer was 
performing poorly, the graph would show inconsistent throughput and fluctuating 
response times. 
+ Unix/Linux BASH shell scripts were used extensively for analysis, and 
preparing data for Excel graphs.
  [[BR]]
  attachment:throughput-graph.png [[BR]]
  
+ === Simple Data Writer JTL files ===
+ JMeter's 
[http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html 
Simple Data Writer] produces JTL output files which convey the same information 
as the default XML output, but the CSV format is much denser. Example: 
+ {{{
+ queryBalance.jtl
+ 
+ 
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,bytes,grpThreads,allThreads,URL
+ 1158477785863,351,SL_queryBalance,200,,queryBalance 
1-1,text,true,87,7,7,http://123.45.67.89:8080/WebService
+ 1158477785953,291,SL_queryBalance,200,,queryBalance 
1-4,text,true,87,7,7,http://123.45.67.89:8080/WebService
+ 1158477785883,431,SL_queryBalance,200,,queryBalance 
1-2,text,true,87,8,8,http://123.45.67.89:8080/WebService
+ 1158477786013,301,SL_queryBalance,200,,queryBalance 
1-5,text,true,87,8,8,http://123.45.67.89:8080/WebService
+ 1158477785883,481,SL_queryBalance,200,,queryBalance 
1-3,text,true,87,9,9,http://123.45.67.89:8080/WebService
+ 1158477786113,331,SL_queryBalance,200,,queryBalance 
1-6,text,true,87,10,10,http://123.45.67.89:8080/WebService
+ 1158477786183,301,SL_queryBalance,200,,queryBalance 
1-7,text,true,87,11,11,http://123.45.67.89:8080/WebService
+ 1158477786404,120,SL_queryBalance,200,,queryBalance 
1-10,text,true,87,11,11,http://123.45.67.89:8080/WebService
+ 1158477786334,200,SL_queryBalance,200,,queryBalance 
1-9,text,true,87,11,11,http://123.45.67.89:8080/WebService
+ 1158477786254,290,SL_queryBalance,200,,queryBalance 
1-8,text,true,87,11,11,http://123.45.67.89:8080/WebService
+ 1158477786474,140,SL_queryBalance,200,,queryBalance 
1-11,text,true,87,12,12,http://123.45.67.89:8080/WebService
+ ...
+ }}}
+ 
- === Excel Throughput Graph ===
+ == 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).  
+ 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 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. The core functionality in `jtlmin.sh` is this piece of awk code:
  {{{
@@ -231, +253 @@

  1160355360      2006.Oct.09     13:56   0       0
  }}}
  
- === Simple Data Writer JTL files ===
- JMeter's 
[http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html 
Simple Data Writer] produces JTL output files which convey the same information 
as the default XML output, but the CSV format is much denser. Example: 
- {{{
- queryBalance.jtl
- 
- 
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,bytes,grpThreads,allThreads,URL
- 1158477785863,351,SL_queryBalance,200,,queryBalance 
1-1,text,true,87,7,7,http://123.45.67.89:8080/WebService
- 1158477785953,291,SL_queryBalance,200,,queryBalance 
1-4,text,true,87,7,7,http://123.45.67.89:8080/WebService
- 1158477785883,431,SL_queryBalance,200,,queryBalance 
1-2,text,true,87,8,8,http://123.45.67.89:8080/WebService
- 1158477786013,301,SL_queryBalance,200,,queryBalance 
1-5,text,true,87,8,8,http://123.45.67.89:8080/WebService
- 1158477785883,481,SL_queryBalance,200,,queryBalance 
1-3,text,true,87,9,9,http://123.45.67.89:8080/WebService
- 1158477786113,331,SL_queryBalance,200,,queryBalance 
1-6,text,true,87,10,10,http://123.45.67.89:8080/WebService
- 1158477786183,301,SL_queryBalance,200,,queryBalance 
1-7,text,true,87,11,11,http://123.45.67.89:8080/WebService
- 1158477786404,120,SL_queryBalance,200,,queryBalance 
1-10,text,true,87,11,11,http://123.45.67.89:8080/WebService
- 1158477786334,200,SL_queryBalance,200,,queryBalance 
1-9,text,true,87,11,11,http://123.45.67.89:8080/WebService
- 1158477786254,290,SL_queryBalance,200,,queryBalance 
1-8,text,true,87,11,11,http://123.45.67.89:8080/WebService
- 1158477786474,140,SL_queryBalance,200,,queryBalance 
1-11,text,true,87,12,12,http://123.45.67.89:8080/WebService
- ...
- }}}
- 
- === 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. Example of usage:
- {{{
- $ utime2ymd
- Usage: utime2ymd <timestamp> [local|gmt] 
- 
- Convert 10-digit Unix timestamp to yyyymmdd.hhmmss format 
-  use local time zone (default) or UTC/GMT
- 
- $ utime2ymd  1158477785863 
- 20060917.192305 local
- 
- $ utime2ymd 3601 gmt
- 19700101.010001 gmt
- }}}
- 
- === Overview of Several Output files ===
+ == 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` (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 (comma-delimited) file 'jtl-file-totals.txt'.  A 
sample of output is shown below.
@@ -286, +271 @@

  total,23040,,,,,
  }}}
  
+ === 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. Example of usage:
+ {{{
+ $ utime2ymd
+ Usage: utime2ymd <timestamp> [local|gmt] 
+ 
+ Convert 10-digit Unix timestamp to yyyymmdd.hhmmss format 
+  use local time zone (default) or UTC/GMT
+ 
+ $ utime2ymd  1158477785863 
+ 20060917.192305 local
+ 
+ $ utime2ymd 3601 gmt
+ 19700101.010001 gmt
+ }}}
+ 
- === Extract from JMeter Test Plan (JMX file) ===
+ == Extract from JMeter Test Plan (JMX file) ==
  Script: attachment:jmxparse.sh.txt [[BR]]
  Another possibly useful tool which will give a text based summary of what's 
in your JMeter JMX script.  Mainly uses grep and sed.
  {{{
@@ -327, +329 @@

  //[EMAIL PROTECTED]"filename"]/text()
  }}}
  
+ === About the Bash scripts ===
+ I used [http://www.mingw.org/ MinGW] with the familiar *nix text processing 
tools; here's a list
+  *[http://prdownloads.sourceforge.net/mingw/MinGW-3.1.0-1.exe?download 
MinGW], [http://prdownloads.sourceforge.net/mingw/MSYS-1.0.10.exe?download 
MSYS], [http://prdownloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?download 
MSys-DTK], 
[http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=26968 
Gnu-bc], 
[http://prdownloads.sourceforge.net/mingw/join_paste_textutils-2.1-MSYS.tar.bz2?download
 paste], [http://www.bzip.org/1.0.3/bzip2-103-x86-linux26 bzip2], 
[ftp://ftp.vim.org/pub/vim/pc/gvim70.exe gVim 7.0]
- === About MinGW/MinSYS and supporting tools ===
- [http://www.mingw.org/download.shtml MinGW] is a subset of Cygwin, but I 
prefer it because it's a lightweight install on Windows, and it has a nicer 
interface (rxvt), but it provides the familiar *nix text processing tools. 
Recommended packages/versions are:
-  * [http://prdownloads.sourceforge.net/mingw/MinGW-3.1.0-1.exe?download 
MinGW-3.1.0-1.exe] Minimalist Gnu for Windows
-  * [http://prdownloads.sourceforge.net/mingw/MSYS-1.0.10.exe?download 
MSYS-1.0.10.exe] Minimal System
-  * [http://prdownloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?download 
msysDTK-1.0.1.exe] Developer tool kit
-  * 
[http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=26968 
bc-1.06-2.exe] Gnu bc "binary calculator" 
-  * 
[http://prdownloads.sourceforge.net/mingw/join_paste_textutils-2.1-MSYS.tar.bz2?download
 join_paste_textutils-2.1] (you'll need  
[http://www.bzip.org/1.0.3/bzip2-103-x86-linux26 bzip2] to extract it)
-  * [ftp://ftp.vim.org/pub/vim/pc/gvim70.exe gVim 7.0] highly recommended for 
editing scripts
- 
- Windows alternatives (with large footprint) are [http://www.cygwin.com 
Cygwin] or 
[http://www.microsoft.com/technet/interopmigration/unix/sfu/default.mspx 
windows SFU], or even ubuntu linux on a Virtual PC.
+  *Windows alternatives [http://www.cygwin.com Cygwin], 
[http://www.microsoft.com/technet/interopmigration/unix/sfu/default.mspx 
Windows SFU], or linux on a Virtual PC
+  *Or use a Linux/Unix OS exclusively to run the above scripts ..
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to