You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Apache Wiki <wi...@apache.org> on 2006/08/09 06:10:32 UTC

[Jakarta-jmeter Wiki] Update of "LogAnalysis" by SonamChauhan

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 SonamChauhan:
http://wiki.apache.org/jakarta-jmeter/LogAnalysis

The comment on the change is:
Added info on generating logs and log format. Reorganized section headings 

------------------------------------------------------------------------------
- == Suggestions and Recipes for Log Analysis ==
+ = Suggestions and Recipes for Log Analysis =
+ Please add your tips and tricks to this page. Extraction scripts and Excel Macros etc welcome!
  
- Please add your tips and tricks to this page. Extraction scripts and Excel Macros etc welcome!
- ----
+ == Generating Appropriate JMeter Logs ==
+ The default data logged during JMeter testing is quite sparse - important request and response fields are stored, but the full response sent back by the server is not stored. This is done to avoid bogging down the test client during load testing.
+ 
+ Using the following JMeter parameters on the command line generates log entries with corresponding higher detail for the test run. 
+ {{{
+ -Jjmeter.save.saveservice.data_type=true -Jjmeter.save.saveservice.label=true  -Jjmeter.save.saveservice.response_code=true -Jjmeter.save.saveservice.response_data=true -Jjmeter.save.saveservice.response_message=true -Jjmeter.save.saveservice.successful=true -Jjmeter.save.saveservice.thread_name=true  -Jjmeter.save.saveservice.time=true"
+ }}}
+ 
+ The JMeter timestamp_format parameter can be used to specify logentry timestamps format. For eg:
+ {{{
+ -Jjmeter.save.saveservice.timestamp_format="yyyy-MM-dd HH:mm:ss"
+ }}}
+ 
+ As of April 2006, JMeter 2.1.1 must also be run with the following flag to ensure logfile uniformity:
+ {{{
+ -Dfile_format.testlog=2.0
+ }}}
+ This forces JMeter to use the old logformat which generates <sampleResult> element for all log entries. The newer format instead generates <httpSample> elements for HTTP requests and <sampleResult> for JDBC sampler entries - this is inconvenient from a automated log processing point of view. Refer this [http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/200604.mbox/%3cE5D178BFB0356B48A48B8330B2903721ED5CA6@syd1exc04.CE.CORP%3e Jmeter-user thread] for more details
+ 
+ The above settings can also be defined as global properties in the JMeter.properties configuration file. 
+ 
+ == The JMeter Log Format ==
+ The format of JMeter log entries generated when using the flags in the previous section is defined in the table below. (Editing note: 4 spaces are used to denote one level of XML 'indentation'.)
+ 
+ ||'''XML Element'''	||'''Explanation'''||
+ ||{{{/testResults		}}}||Root element for XML test log||
+ ||{{{    @version    	}}}||Version of test results. Currently (JMeter 2.1.1), set to "1.1" irrespective of testlog format flag.||
+ ||{{{    /sampleResult/...}}}||All log data is stored under an array of 'sampleResult' elements.||
+ ||{{{        @timeStamp	}}}||Timestamp||
+ ||{{{        @dataType	}}}||Datatype - typically "text"||
+ ||{{{        @threadName	}}}||Name set for the thread group, with affixed at the end  " <iteration>-<thread_id>". For eg    "Integration Tests Thread Group 1-1"||
+ ||{{{        @label		}}}||Label set for the sampler. For eg    "Login to Custom URL using test account credentials" ||
+ ||{{{        @time		}}}||Time in milliseconds for request to complete. Eg    "2515" ||
+ ||{{{        @responseMessage	}}}||Response message. Eg    "OK" ||
+ ||{{{        @responseCode	}}}||Response code. Eg    "200" ||
+ ||{{{        @success		}}}||String indicating status of the request. Can be "true" or "false"||
+ ||{{{        /sampleResult/...	}}}||HTTP Redirects are represented as an array of nested 'sampleResult' elements. Only 1 level of nesting occurs (i.e. the nested subresults do not nest further).||
+ ||{{{        /property		}}}||A string containing POST Data, Query Data and Cookie Data||
+ ||{{{            @xml:space	}}}||XML attribute indicating whether that white space is significant. Set to "preserve" ||
+ ||{{{            @name		}}}||Set to "samplerData"||
+ ||{{{        /assertionResult/...	}}}||Assertion information are stored in an array of assertionResult||
+ ||{{{            @failureMessage	}}}||The failure message when the assertion fails||
+ ||{{{            @error		}}}||Set to "true" or "false" to indicate error in assertion (stays "false" on assertion failure)||
+ ||{{{            @failure		}}}||Set to "true" or "false" to indicate whether assertion failed or not||
+ ||{{{        /binary		}}}||Data returned in response||
+ 
+ 
+ 
+ 
+ == Perl Based Method for Log Extraction ==
- Here are the steps Sonam Chauhan uses to import and process JMeter log data in Excel. Steps #3 and 4 are quite painstaking. It would be nice to have a macro to automate those steps - however, it is beyond my Excel abilities at the moment.:
+ Here are some steps to import and process JMeter log data in Excel. Steps #3 and 4 are painstaking and can be automated by Excel macros - however, this is beyond my abilities at the moment:
  
  1. First, generate delimited file for import into Excel. 
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org