<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4288665368936417675</id><updated>2026-10-10T02:17:01.097-07:00</updated><category term="loadrunner"/><category term="vugen"/><category term="performance"/><category term="stability"/><category term="fault tolerance"/><category term="load"/><category term="network"/><category term="java"/><category term="linux"/><category term="performance center"/><category term="scalability"/><category term="stress"/><category term="xml"/><category term="histogram"/><category term="monitoring"/><category term="response time"/><category term="timestamp"/><category term="JSON"/><category term="REST"/><category term="async"/><category term="asynchronous"/><category term="callback"/><category term="cpu"/><category term="crash"/><category term="disk"/><category term="heap"/><category term="http"/><category term="logging"/><category term="memory"/><category term="parameterization"/><category term="polling"/><category term="server resource usage"/><category term="test"/><category term="tools"/><category term="trend"/><category term="visualization"/><category term="waiting"/><category term="CSV"/><category term="REST web service"/><category term="ROI"/><category term="SLA"/><category term="SSL"/><category term="analysis"/><category term="bandwidth"/><category term="baseline"/><category term="bash"/><category term="benchmark"/><category term="black swan"/><category term="capacity"/><category term="capturing"/><category term="certificates"/><category term="charting"/><category term="charts"/><category term="compression"/><category term="current time"/><category term="currentTimeMillis"/><category term="custom metrics"/><category term="database"/><category term="datetime"/><category term="debugging"/><category term="distribution chart"/><category term="download"/><category term="downstream service"/><category term="dump"/><category term="eden space"/><category term="encoding"/><category term="errors"/><category term="fat tail"/><category term="fiddler"/><category term="garbage collection"/><category term="generations"/><category term="graphs"/><category term="grinder"/><category term="heap dump"/><category term="heap space"/><category term="heap usage"/><category term="http headers"/><category term="image"/><category term="infrastructure"/><category term="instability"/><category term="iteration number"/><category term="jmap"/><category term="jperfmeter"/><category term="jstat"/><category term="junit"/><category term="linux stress test"/><category term="load generator name"/><category term="loadrunner continuous integration"/><category term="management"/><category term="measuring"/><category term="memory leak"/><category term="metrics"/><category term="microsecond"/><category term="millisecond"/><category term="nanoTime"/><category term="nanosecond"/><category term="odbc"/><category term="old generation"/><category term="outage"/><category term="parallels virtuozzo"/><category term="parameterizationameterization"/><category term="peak"/><category term="performance testing"/><category term="proxy"/><category term="random numbers"/><category term="resilience"/><category term="resiliency"/><category term="return on investment"/><category term="sar"/><category term="script"/><category term="security"/><category term="soap"/><category term="stress test"/><category term="sub-transaction"/><category term="survivor space"/><category term="team"/><category term="throughput"/><category term="timeline"/><category term="unicode"/><category term="unique"/><category term="unique id"/><category term="unique name"/><category term="unit test"/><category term="utf-8"/><category term="utilization"/><category term="virtual machine"/><category term="virtualization"/><category term="vmware"/><category term="vuser id"/><category term="winsql"/><category term="xen"/><category term="young generation"/><title type='text'>sub-second</title><subtitle type='html'>A blog on performance testing, load testing, stress testing, stability testing, capacity planning, performance tuning, etc.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>50</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-5016626737909085358</id><published>2015-09-29T15:33:00.003-07:00</published><updated>2015-09-29T15:33:42.835-07:00</updated><title type='text'>Load Testing with Selenium Grid</title><content type='html'>Selenium grid is an open source browser-based test tool that allows multiple concurrent browsers to run at the same time, spread across a number of nodes. &amp;nbsp;With each node running multiple browsers and many nodes in place, a significant number of concurrent browsers be pointed at a web site and substantial load generated.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5Dgm4h5uGQ2OICuQLrpcOzT6CTpnb185nxi7nScpuH9-IuqblvgZuo2qPgToujbPw1g_NjDkpmKjqj2FLPQJ5jje7AOx5OX2hV_ZzpWf1Q1h2s1JikPIxFoIlNoIRsY25Z-dKVkBl2oXj/s1600/selenium-grid.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;272&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5Dgm4h5uGQ2OICuQLrpcOzT6CTpnb185nxi7nScpuH9-IuqblvgZuo2qPgToujbPw1g_NjDkpmKjqj2FLPQJ5jje7AOx5OX2hV_ZzpWf1Q1h2s1JikPIxFoIlNoIRsY25Z-dKVkBl2oXj/s640/selenium-grid.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
Some Advantages&lt;/h2&gt;
Selenium webdriver runs real browsers which execute javascript on the client-side and can give realistic response times and realistic user behavior.&lt;br /&gt;
&lt;br /&gt;
Selenium integrates well with modern java stacks such as junit, testng, jenkins, gradle, ant, etc.&lt;br /&gt;
&lt;br /&gt;
Cost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Some Drawbacks&lt;/h2&gt;
There may be bugs, such as limited compatibility with some versions of some browsers.&lt;br /&gt;
&lt;br /&gt;
There may be maintenance overhead.&lt;br /&gt;
&lt;br /&gt;
The amount of load that can be generated is limited. &amp;nbsp;Real browsers are expensive to run in terms of cpu and memory requirements, so a lot of client nodes can be required to generate enough load. &amp;nbsp;It is more appropriate for moderate load. &amp;nbsp;I&#39;m not sure what the limits of the number of concurrent browsers this approach will support, but dozens of concurrent browsers can easily be supported. &amp;nbsp;It is possible that hundreds of concurrent browsers may be too much. &amp;nbsp;For very large tests, commercial tools and more efficient load generation approaches targeting lower-level traffic may be more suitable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
How&lt;/h2&gt;
Set up a selenium grid hub and a number of selenium grid nodes registered to that hub. &amp;nbsp;This can be done in a cloud provider such as AWS or using on-premise hardware.&lt;br /&gt;
The desired versions of browsers to be tested should be installed on the nodes.&lt;br /&gt;
Nodes should have graphics cards that give responsive browser behavior.&lt;br /&gt;
Limit the max number of browsers per node to be no more than the number of CPUs per node.&lt;br /&gt;
Other than for node debugging, disable node logging which can be very verbose and fill up the file system.&lt;br /&gt;
In the java client test application, each test thread should get a thread local instance of Selenium WebDriver. &amp;nbsp;This will result in a thread-safe WebDriver, with browsers not interfering with one another.&lt;br /&gt;
Test the node infrastructure by, for example, running five browsers on one node versus running one browser on each of five nodes.&lt;br /&gt;
Once the grid infrastructure has been validated, the target website can then be tested for scalability by slowly ramping up the number of concurrent browsers until response time knee is hit.&lt;br /&gt;
Stability of the target website can be tested by running near peak load for an extended period of time. &amp;nbsp;Be sure to log results along the way in case of a client-side crash.&lt;br /&gt;
Browser snapshots can be saved when errors are encountered, making bug identification simple.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/5016626737909085358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2015/09/load-testing-with-selenium-grid.html#comment-form' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/5016626737909085358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/5016626737909085358'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2015/09/load-testing-with-selenium-grid.html' title='Load Testing with Selenium Grid'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5Dgm4h5uGQ2OICuQLrpcOzT6CTpnb185nxi7nScpuH9-IuqblvgZuo2qPgToujbPw1g_NjDkpmKjqj2FLPQJ5jje7AOx5OX2hV_ZzpWf1Q1h2s1JikPIxFoIlNoIRsY25Z-dKVkBl2oXj/s72-c/selenium-grid.JPG" height="72" width="72"/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-2619310837814930155</id><published>2013-12-03T15:16:00.002-08:00</published><updated>2013-12-03T15:16:08.351-08:00</updated><title type='text'>Performance Testing in a Continuous Integration Environment</title><content type='html'>Software development groups with continuous integration in place (to handle automatic build and test on any check-in) should ideally include performance and load testing in the continuous integration process. &amp;nbsp;This article describes my experiences implementing such a solution at a large enterprise software company.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Infrastructure Needed&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;A continuous integration system such as jenkins, teamcity, etc. that is able to build code and run tests&lt;/li&gt;
&lt;li&gt;An automated deployment system that can programmatically deploy and start newly built code&lt;/li&gt;
&lt;li&gt;A performance test framework supporting performance tests that are runnable by the continuous integration system against the automatically deployed code&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Performance test framework&lt;/span&gt;&lt;br /&gt;
The performance test framework could be a third-party framework such as jmeter that integrates well with CI systems, unit test frameworks (such as testng or junit) and other open source software. &amp;nbsp;the solution I chose was to implement an in-house performance test framework. &amp;nbsp;This perf test framework was designed to make it trivial to take an arbitrary junit test class and convert it to a performance test with less than 5 minutes of work. &amp;nbsp;This allows the extensive library of automated tests already implemented (in the junit framework) to be leveraged as performance test cases. &lt;br /&gt;
&lt;br /&gt;
This performance test framework supported functionality including the following, which would be a reasonable minimal set of performance test framework functionality:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Allow any test case to be converted to a performance test with minimal effort. &amp;nbsp;(In this case, it is achieved by having the test class extend a PerfTestBase class and implement an IPerfTest interface.)&lt;/li&gt;
&lt;li&gt;Allow any block of code to be wrapped as a transaction to be measured.&lt;/li&gt;
&lt;li&gt;Allow the test to be run for a configured amount of time or a configured number of iterations.&lt;/li&gt;
&lt;li&gt;Allow the test to be run concurrently by a configurable number of client threads.&lt;/li&gt;
&lt;li&gt;Allow the test to gradually scale up load as configured, such as 1 test case at a time, 2 concurrent test cases, 5 concurrent test cases, etc.&lt;/li&gt;
&lt;li&gt;Handle exceptions and errors.&lt;/li&gt;
&lt;li&gt;Allow the test to pass or fail based on configurable performance criteria such as response time SLAs, performance versus previous test runs, etc.&lt;/li&gt;
&lt;li&gt;Allow the test to be run in an IDE, from the command line, and from the continuous integration system.&lt;/li&gt;
&lt;li&gt;Persist results in a database for historical reporting&lt;/li&gt;
&lt;li&gt;Automatically generate test result artifacts and charts including response time trends over time, performance relative to previous test runs, performance versus number of concurrent test cases, etc.&lt;/li&gt;
&lt;li&gt;Automatically calculate any performance metrics needed for reporting.&lt;/li&gt;
&lt;li&gt;Automatically push results to sinks such as email distribution lists, dashboards, third party reporting repositories, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Stretch goals for a performance test framework include the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Handle stress test cases in which the test process, the services under test, or the OS might freeze up, requiring external monitoring and catastrophic failure handling.&lt;/li&gt;
&lt;li&gt;Handle capacity testing in which the absolute capacity of a service is reached programmatically.&lt;/li&gt;
&lt;li&gt;Handle performance of fault-tolerance scenarios in which some of the services under test are programmatically brought down and up.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Findings&lt;/span&gt;&lt;br /&gt;
My experience doing performance testing within the continuous integration system is that the tests find, on a daily basis, deep stability and performance bugs. Bugs found include deadlocks, race conditions, out of memory exceptions, process crashes, response time regressions, etc. &amp;nbsp;This allows a very large amount of performance testing to be done with minimal staffing resources. &amp;nbsp;There are up-front costs implementing the tests and getting them running the continuous integration system. &amp;nbsp;Once the performance tests are implemented, the bulk of the ongoing work involves triaging, driving and resolving the performance and stability bugs that are found automatically on a daily basis.&lt;br /&gt;
&lt;br /&gt;
I believe this type of system constitutes a significant leap forward versus traditional manual performance testing. &amp;nbsp;Traditional, manual performance testing &amp;nbsp;is labor intensive and requires expensive, antiquated third-party testing tools.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/2619310837814930155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2013/12/performance-testing-in-continuous.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/2619310837814930155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/2619310837814930155'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2013/12/performance-testing-in-continuous.html' title='Performance Testing in a Continuous Integration Environment'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-8977354780953138277</id><published>2013-02-05T09:55:00.007-08:00</published><updated>2013-02-05T09:55:59.344-08:00</updated><title type='text'>Timing Command Line Applications on Linux</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
The command line time utility available on linux as /usr/bin/time can be used to measure the elapsed time of test applications launched from the command line, and also measure other information such as cpu time and other metrics, outputting the result as a csv file that can then be easily charted. &amp;nbsp;Using the &quot;format&quot; option of the time utility allows the output to be formatted as csv with a single line per app run, rather than the default output which contains multiple lines of output.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Script&lt;/h2&gt;
&lt;br /&gt;
echo TestCase , Seconds , RealTime , CpuTimeUser , CpuTimeKernel&lt;br /&gt;
/usr/bin/time --format=&quot;MyTestCase1 , %e , %E , %U , %S&quot; ./mytestcase1.sh mytestcase1parameter&lt;br /&gt;
&lt;br /&gt;
/usr/bin/time --format=&quot;MyTestCase2 , %e , %E , %U , %S&quot; java -jar mytestcase2.jar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Output&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
TestCase , Seconds , RealTime , CpuTimeUser , CpuTimeKernel&lt;/div&gt;
&lt;div&gt;
MytestCase1 , 679.33 , 11:19.33 , 227.13 , 105.85&lt;/div&gt;
&lt;div&gt;
MytestCase2 , 460.99 , 7:40.99 , 96.32 , 44.64&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Format String&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The format string can be configured to output the following options:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Time&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%E &amp;nbsp; &amp;nbsp; Elapsed real time (in [hours:]minutes:seconds).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%e &amp;nbsp; &amp;nbsp; (Not in tcsh.) Elapsed real time (in seconds).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%S &amp;nbsp; &amp;nbsp; Total number of CPU-seconds that the process spent in kernel mode.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%U &amp;nbsp; &amp;nbsp; Total number of CPU-seconds that the process spent in user mode.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%P &amp;nbsp; &amp;nbsp; Percentage of the CPU that this job got, computed as (%U + %S) / %E.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Memory&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%M &amp;nbsp; &amp;nbsp; Maximum resident set size of the process during its lifetime, in Kbytes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%t &amp;nbsp; &amp;nbsp; (Not in tcsh.) Average resident set size of the process, in Kbytes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%K &amp;nbsp; &amp;nbsp; Average total (data+stack+text) memory use of the process, in Kbytes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%D &amp;nbsp; &amp;nbsp; Average size of the processâs unshared data area, in Kbytes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%p &amp;nbsp; &amp;nbsp; (Not in tcsh.) Average size of the processâs unshared stack space, in Kbytes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%X &amp;nbsp; &amp;nbsp; Average size of the processâs shared text space, in Kbytes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%Z &amp;nbsp; &amp;nbsp; (Not in tcsh.) Systemâs page size, in bytes. &amp;nbsp;This is a per-system constant, but varies between systems.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%F &amp;nbsp; &amp;nbsp; Number of major page faults that occurred while the process was running. &amp;nbsp;These are faults where the page has to be &amp;nbsp;read &amp;nbsp;in &amp;nbsp;from&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; disk.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%R &amp;nbsp; &amp;nbsp; Number of minor, or recoverable, page faults. &amp;nbsp;These are faults for pages that are not valid but which have not yet been claimed by&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; other virtual pages. &amp;nbsp;Thus the data in the page is still valid but the system tables must be updated.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%W &amp;nbsp; &amp;nbsp; Number of times the process was swapped out of main memory.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%c &amp;nbsp; &amp;nbsp; Number of times the process was context-switched involuntarily (because the time slice expired).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%w &amp;nbsp; &amp;nbsp; Number of waits: times that the program was context-switched voluntarily, for instance while waiting for an I/O operation &amp;nbsp;to &amp;nbsp;com-&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; plete.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I/O&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%I &amp;nbsp; &amp;nbsp; Number of file system inputs by the process.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%O &amp;nbsp; &amp;nbsp; Number of file system outputs by the process.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%r &amp;nbsp; &amp;nbsp; Number of socket messages received by the process.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%s &amp;nbsp; &amp;nbsp; Number of socket messages sent by the process.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%k &amp;nbsp; &amp;nbsp; Number of signals delivered to the process.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%C &amp;nbsp; &amp;nbsp; (Not in tcsh.) Name and command-line arguments of the command being timed.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%x &amp;nbsp; &amp;nbsp; (Not in tcsh.) Exit status of the command.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 256px;&quot;&gt;&lt;colgroup&gt;&lt;col span=&quot;4&quot; style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/8977354780953138277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2013/02/timing-command-line-applications-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/8977354780953138277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/8977354780953138277'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2013/02/timing-command-line-applications-on.html' title='Timing Command Line Applications on Linux'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-3603191793400822759</id><published>2012-12-10T10:16:00.000-08:00</published><updated>2012-12-10T10:16:43.476-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="download"/><category scheme="http://www.blogger.com/atom/ns#" term="image"/><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="vugen"/><title type='text'>Loadrunner How to Download an Image</title><content type='html'>Usually images such as jpg, gif, png, etc., will be downloaded automatically as extra resources. &amp;nbsp;However, occasionally it is necessary to download images directly. &amp;nbsp;Downloading an image directly can be done easily as follows:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;make web_url call requesting jpg, gif, png, etc.&lt;/li&gt;
&lt;li&gt;Set Resource=1 indicating the the downloaded item is a resource&lt;/li&gt;
&lt;li&gt;Use content type/mime type &quot;image/jpg&quot;, &quot;image/gif&quot;, &quot;image/png&quot;, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The following script illustrates this method as follows:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Image of type png is downloaded&lt;/li&gt;
&lt;li&gt;Downloaded image file size is retrieved and checked that it is as expected.&lt;/li&gt;
&lt;li&gt;Script writes an error message is the downloaded size is not as expected.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2&gt;
Script&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;long imgSize=0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;web_url(&quot;test pdf download&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;URL=http://www.google.com/images/nav_logo114.png&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;Resource=1&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;RecContentType=image/png&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;Snapshot=t1.inf&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LAST);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; // Save pdf file size&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;imgSize = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Verify size is as expected (~28765 bytes 321 header bytes)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (imgSize &amp;lt; 28765 ) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_error_message(&quot;File download error, expected ~247,800 bytes but got %d&quot;, imgSize);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;} else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_output_message(&quot;File downloaded size okay, expected ~247,800 bytes and got %d&quot;, imgSize);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;h2&gt;
Console Output&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Running Vuser...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Starting iteration 1.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Starting action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(6): web_url(&quot;test pdf download&quot;) was successful, 28765 body bytes, 321 header bytes &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26386]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(14): web_get_int_property was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26392]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(20): File downloaded size okay, expected ~247,800 bytes and got 29086&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Ending action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Ending iteration 1.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Ending Vuser...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/3603191793400822759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/12/loadrunner-how-to-download-image.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3603191793400822759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3603191793400822759'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/12/loadrunner-how-to-download-image.html' title='Loadrunner How to Download an Image'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-3653728074175606215</id><published>2012-12-07T09:58:00.004-08:00</published><updated>2012-12-07T09:58:57.916-08:00</updated><title type='text'>Loadrunner How to Download PDF File</title><content type='html'>A pdf file can be downloaded in loadrunner as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;make web_url call requesting pdf&lt;/li&gt;
&lt;li&gt;Set Resource=1 indicating the the downloaded item is a resource&lt;/li&gt;
&lt;li&gt;Use content type/mime type &quot;application/pdf&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The following script illustrates this method as follows:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Pdf is downloaded&lt;/li&gt;
&lt;li&gt;Downloaded pdf file size is retrieved and checked that it is as expected.&lt;/li&gt;
&lt;li&gt;Pdf file contents is saved to a parameter&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2&gt;
Script&lt;/h2&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;long pdfSize=0;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;web_reg_save_param(&quot;pdfContent&quot;,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;LB=&quot;,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;RB=&quot;,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LAST );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;web_url(&quot;test pdf download&quot;, &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;URL=http://research.google.com/archive/disk_failures.pdf&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;Resource=1&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;RecContentType=application/pdf&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;Snapshot=t1.inf&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LAST);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; // Save pdf file size&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;pdfSize = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Verify size is as expected (~247808 bytes)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (pdfSize &amp;lt; 247000) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//End the transaction&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_error_message(&quot;File download error, expected ~247,800 bytes but got %d&quot;, pdfSize);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;} else {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_output_message(&quot;File downloaded size okay, expected ~247,800 bytes and got %d&quot;, pdfSize);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_output_message(&quot;pdfContent=%s&quot;, lr_eval_string(&quot;{pdfContent}&quot;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;
Console Output&lt;/h2&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Starting action Action.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(6): Registering web_reg_save_param was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26390]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(11): Redirecting &quot;http://research.google.com/archive/disk_failures.pdf&quot; (redirection depth is 0) &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26694]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(11): To location &quot;http://static.googleusercontent.com/external_content/untrusted_dlcp/research.google.com/en/us/archive/disk_failures.pdf&quot; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26693]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(11): web_url(&quot;test pdf download&quot;) was successful, 247808 body bytes, 715 header bytes &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26386]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(19): web_get_int_property was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26392]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(26): File downloaded size okay, expected ~247,800 bytes and got 248523&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action.c(30): pdfContent=HTTP/1.0 302 Found&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Location: http://static.googleusercontent.com/external_content/untrusted_dlcp/research.google.com/en/us/archive/disk_failures.pdf&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Cache-Control: private&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Content-Type: text/html; charset=UTF-8&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/3653728074175606215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/12/loadrunner-how-to-download-pdf-fiile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3653728074175606215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3653728074175606215'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/12/loadrunner-how-to-download-pdf-fiile.html' title='Loadrunner How to Download PDF File'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-567129517429073630</id><published>2012-11-21T10:46:00.003-08:00</published><updated>2012-11-21T10:46:28.743-08:00</updated><title type='text'>Mysql Performance Monitoring - Script</title><content type='html'>&lt;br /&gt;
The following provides a linux shell script that provides some basic mysql performance monitoring. &amp;nbsp;It reports the following metrics every N seconds based on the parameter passed in:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;timestamp&lt;/li&gt;
&lt;li&gt;queries per second&lt;/li&gt;
&lt;li&gt;threads connected&lt;/li&gt;
&lt;li&gt;connections&lt;/li&gt;
&lt;li&gt;slow queries per second&lt;/li&gt;
&lt;li&gt;rows read per second&lt;/li&gt;
&lt;li&gt;rows inserted per second&lt;/li&gt;
&lt;li&gt;rows updated per second&lt;/li&gt;
&lt;li&gt;rows deleted per second&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The results are written into a csv output file mysql-stats.csv.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Script&lt;/h2&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# mysql-stats.sh&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# mysql stats sampled every $1 seconds until stopped&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if [ &quot;$1&quot; == &quot;&quot; ] ; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; echo &quot;syntax= ./mysql-stats.sh &amp;lt;intervalSeconds&amp;gt;&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; exit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;time=$1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origqps=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Queries&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origconn=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Threads_connected&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origconnattempt=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Connections&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origslowqry=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Slow_queries&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origrowsread=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Innodb_rows_read&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;originserted=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Innodb_rows_inserted&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origupdated=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Innodb_rows_updated&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origdeleted=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Innodb_rows_deleted&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;echo &quot;Stats (show status) sampled every $time seconds&quot; &amp;gt; mysql-stats.csv&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;echo &quot;Time , Queries , Threads_connected , Connections , Slow_queries , Innodb_rows_read , inserted , updated , deleted&quot; &amp;gt;&amp;gt; mysql-stats.csv&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;x=1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;while :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sleep $time&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;lastqps=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Queries&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;lastconn=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Threads_connected&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;lastconnattempt=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Connections&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;lastslowqry=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Slow_queries&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;lastrowsread=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Innodb_rows_read&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;lastinserted=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Innodb_rows_inserted&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;lastupdated=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Innodb_rows_updated&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;lastdeleted=`mysql -u username -p password &quot;show status&quot; | awk &#39;{if ($1 == &quot;Innodb_rows_deleted&quot;) print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;diffqps=`expr $lastqps - $origqps`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#diffconn=`expr $lastconn - $origconn`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;diffconnattempt=`expr $lastconnattempt - $origconnattempt`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;diffslowqry=`expr $lastslowqry - $origslowqry`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;diffrowsread=`expr $lastrowsread - $origrowsread`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;diffinserted=`expr $lastinserted - $originserted`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;diffupdated=`expr $lastupdated - $origupdated`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;diffdeleted=`expr $lastdeleted - $origdeleted`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;avgqps=`expr $diffqps / $time`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#avgconn=`expr $diffconn / $time`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;avgconnattempt=`expr $diffconnattempt / $time`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;avgslowqry=`expr $diffslowqry / $time`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;avgrowsread=`expr $diffrowsread / $time`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;avginserted=`expr $diffinserted / $time`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;avgupdated=`expr $diffupdated / $time`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;avgdeleted=`expr $diffdeleted / $time`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#echo &quot;$avgqps&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;date=`date`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;echo &quot;$date , $avgqps , $lastconn , $avgconnattempt , $avgslowqry , $avgrowsread , $avginserted , $avgupdated , $avgdeleted&quot; &amp;gt;&amp;gt; mysql-stats.csv&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origqps=$lastqps&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origconn=$lastconn&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origconnattempt=$lastconnattempt&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origslowqry=$lastslowqry&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origrowsread=$lastrowsread&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;originserted=$lastinserted&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origupdated=$lastupdated&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;origdeleted=$lastdeleted&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;done&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Output&lt;/h2&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Stats (show status) sampled every 10 seconds&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Time , Queries , Threads_connected , Connections , Slow_queries , Innodb_rows_read , inserted , updated , deleted&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:32:37 PDT 2012 , 13 , 5 , 0 , 0 , 45 , 0 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:32:47 PDT 2012 , 13 , 5 , 0 , 0 , 45 , 0 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:32:57 PDT 2012 , 1374 , 5 , 0 , 0 , 258 , 352 , 0 , 153&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:33:07 PDT 2012 , 4061 , 26 , 2 , 0 , 907 , 976 , 28 , 83&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:33:17 PDT 2012 , 12122 , 26 , 0 , 0 , 374 , 3026 , 0 , 89&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:33:27 PDT 2012 , 9714 , 26 , 0 , 0 , 45 , 2412 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:33:37 PDT 2012 , 8694 , 26 , 0 , 0 , 45 , 2162 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:33:47 PDT 2012 , 4659 , 26 , 0 , 0 , 45 , 1153 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:33:57 PDT 2012 , 4237 , 26 , 0 , 0 , 45 , 1053 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:34:07 PDT 2012 , 3668 , 26 , 0 , 0 , 332 , 921 , 0 , 108&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:34:17 PDT 2012 , 3739 , 26 , 0 , 0 , 45 , 928 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:34:27 PDT 2012 , 3636 , 26 , 0 , 0 , 45 , 902 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:34:38 PDT 2012 , 4526 , 26 , 0 , 0 , 45 , 1125 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:34:48 PDT 2012 , 3734 , 26 , 0 , 0 , 45 , 927 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Tue Sep 18 14:34:58 PDT 2012 , 3678 , 26 , 0 , 0 , 45 , 912 , 0 , 0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/567129517429073630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/11/mysql-performance-monitoring-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/567129517429073630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/567129517429073630'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/11/mysql-performance-monitoring-script.html' title='Mysql Performance Monitoring - Script'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-4581639598693925282</id><published>2012-11-19T16:41:00.000-08:00</published><updated>2012-11-21T10:46:49.253-08:00</updated><title type='text'>Mysql Performance Monitoring - Graphical Tool</title><content type='html'>One simple method of mysql performance monitoring is using the free tool MysqlMonitorTool. &amp;nbsp;It allows you to connect to a set of mysql instances and view charts showing some basic performance information including the following:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;connections&lt;/li&gt;
&lt;li&gt;inserted rows per second&lt;/li&gt;
&lt;li&gt;updated rows per second&lt;/li&gt;
&lt;li&gt;deleted rows per second&lt;/li&gt;
&lt;li&gt;read rows per second&lt;/li&gt;
&lt;li&gt;slow queries per second&lt;/li&gt;
&lt;li&gt;queries per second&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The following shows the display:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv5w_DIRqk7kaWt-n3oGHJMeqJOwwKazmYbwPSnkvxKFT_W5BdZ4LtEwRfycErIt3bHTWDwvYvqF_ahtX6WYRuK7QtPkKAx3uVBiSy_Ukr9UJoubfEh5qTWQRtK6utBL53iOi0Gh7eui7L/s1600/mysqlmonitortool.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;510&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv5w_DIRqk7kaWt-n3oGHJMeqJOwwKazmYbwPSnkvxKFT_W5BdZ4LtEwRfycErIt3bHTWDwvYvqF_ahtX6WYRuK7QtPkKAx3uVBiSy_Ukr9UJoubfEh5qTWQRtK6utBL53iOi0Gh7eui7L/s640/mysqlmonitortool.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The tool is fairly easy to use as follows:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Download and unzip from&amp;nbsp;&lt;a href=&quot;http://sourceforge.net/projects/mysqlmt/&quot;&gt;http://sourceforge.net/projects/mysqlmt/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Create a batch or executable script that points to the tool&#39;s jar file: &amp;nbsp;java -jar MysqlMonitorTool.jar&lt;/li&gt;
&lt;li&gt;Run the batch script&lt;/li&gt;
&lt;li&gt;Click server configuration, then click &quot;add new server&quot;, then enter your server configuration (servername, host, port, username, password) for one or more mysql instances.&lt;/li&gt;
&lt;li&gt;Click &quot;add new server group&quot; and create a server group and add the servers you created to the group.&lt;/li&gt;
&lt;li&gt;Connect and the app will connect to your instances and provide the following tabs:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;ProcessList&lt;/li&gt;
&lt;li&gt;charts&lt;/li&gt;
&lt;li&gt;Status Vars&lt;/li&gt;
&lt;li&gt;Server Vars&lt;/li&gt;
&lt;li&gt;Recording (to record chart output)&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/4581639598693925282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/11/mysql-performance-monitoring-visual.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4581639598693925282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4581639598693925282'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/11/mysql-performance-monitoring-visual.html' title='Mysql Performance Monitoring - Graphical Tool'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv5w_DIRqk7kaWt-n3oGHJMeqJOwwKazmYbwPSnkvxKFT_W5BdZ4LtEwRfycErIt3bHTWDwvYvqF_ahtX6WYRuK7QtPkKAx3uVBiSy_Ukr9UJoubfEh5qTWQRtK6utBL53iOi0Gh7eui7L/s72-c/mysqlmonitortool.jpg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-3253061769173975820</id><published>2012-11-19T13:46:00.002-08:00</published><updated>2012-11-19T13:46:42.152-08:00</updated><title type='text'>Loadrunner Check for Substring in Response</title><content type='html'>The following describes one method for checking a response for a specific substring. &amp;nbsp;The method is:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Use web_reg_find to search the response to the next request for the specified substring, saving the count in a parameter&lt;/li&gt;
&lt;li&gt;Make the request&lt;/li&gt;
&lt;li&gt;Check the count parameter for the number of occurrences of the substring&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The following script illustrates the method, searching for the substrings &quot;Google&quot; and &quot;Microsoft&quot; in an http request to http://www.google.com, printing out the results.&lt;br /&gt;
&lt;h2&gt;
Script&lt;/h2&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Action()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;char *response;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// save response&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; web_reg_save_param(&quot;responseParam&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;LB=&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;RB=&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LAST );&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // check response for substrings &quot;Google&quot; and &quot;Microsoft&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;web_reg_find(&quot;Text=Microsoft&quot;, &quot;SaveCount=microsoft_count&quot;, LAST );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;web_reg_find(&quot;Text=Google&quot;, &quot;SaveCount=google_count&quot;, LAST );&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// send request&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;web_url(&quot;test&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;URL=http://www.google.com&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;Resource=1&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;RecContentType=text/plain&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;Referer=http://www.google.com/&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;Snapshot=t12.inf&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LAST);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// Save respone to string&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//response = lr_eval_string(lr_eval_string(&quot;{responseParam}&quot;));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//lr_message(&quot;response = %s&quot;, response);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// check whether substring &quot;Google&quot; was found&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (strcmp(lr_eval_string(&quot;{google_count}&quot;), &quot;0&quot;) &amp;gt; 0) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_output_message(&quot;Found %s occurrences of substring \&quot;Google\&quot; in response&quot;, lr_eval_string(&quot;{google_count}&quot;));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;} else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_output_message(&quot;Did not find substring \&quot;Google\&quot; in response&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// check whether substring &quot;Microsoft&quot; was found&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (strcmp(lr_eval_string(&quot;{microsoft_count}&quot;), &quot;0&quot;) &amp;gt; 0) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_output_message(&quot;Found %s occurrences of \&quot;Microsoft\&quot; in response&quot;, lr_eval_string(&quot;{search_count}&quot;));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;} else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_output_message(&quot;Did not find substring \&quot;Microsoft\&quot; in response&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Console Output&lt;/h2&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Starting iteration 1.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Starting action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(7): Registering web_reg_save_param was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26390]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(13): Registering web_reg_find was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26390]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(14): Registering web_reg_find was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26390]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(17): Registered web_reg_find successful for &quot;Text=Microsoft&quot; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26362]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(17): Registered web_reg_find successful for &quot;Text=Google&quot; (count=7) &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26364]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(17): web_url(&quot;test&quot;) was successful, 5034 body bytes, 736 header bytes &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26386]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(31): Found 7 occurrences of substring &quot;Google&quot; in response&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(40): Did not find substring &quot;Microsoft&quot; in response&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Ending action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;Ending iteration 1.&lt;/span&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/3253061769173975820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/11/loadrunner-check-for-substring-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3253061769173975820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3253061769173975820'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/11/loadrunner-check-for-substring-in.html' title='Loadrunner Check for Substring in Response'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-2446287449023492204</id><published>2012-11-07T12:21:00.003-08:00</published><updated>2013-01-30T16:33:20.635-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debugging"/><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="logging"/><category scheme="http://www.blogger.com/atom/ns#" term="vugen"/><title type='text'>Loadrunner Logging Options</title><content type='html'>There are a number of different functions provided by Loadrunner for logging, including:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;lr_message&lt;/li&gt;
&lt;li&gt;lr_output_message&lt;/li&gt;
&lt;li&gt;lr_error_message&lt;/li&gt;
&lt;li&gt;lr_log_message&lt;/li&gt;
&lt;li&gt;lr_debug_message&lt;/li&gt;
&lt;li&gt;lr_vuser_status_message&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
This post provides a script illustrating each of these logging methods, and a description of the differences.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;lr_message&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
The limitation of lr_message is that no source file (such as Action.c) or line number is provided.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;lr_output_message&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
lr_output_message includes source file and line number information which is useful for debugging issues.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;lr_error_message&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
lr_error_message flags the message as an error rather than informational.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;lr_log_message&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
lr_log_message can reduce some network traffic during load tests by not sending messages to the load test output window.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;lr_debug_message&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
lr_debug_message can write message conditionally on certain logging settings being enabled&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;b&gt;lr_vuser_status_message&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
lr_vuser_status_message updates the vuser status field during load tests&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
The following script illustrates the various logging methods.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Script&lt;/h2&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Action()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// setup test message data&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int msgLevel;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;char *message = &quot;This is a test message.&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // save string to a parameter&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lr_save_string(message, &quot;messageParam&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// lr_message test&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;---------------------- lr_message --------------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;--- lr_message does not show the source file and line number&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;--- lr_message: %s&quot;, message);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;----------------- end lr_message ---------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// lr_output_message test&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;------------------- lr_output_message -----------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;--- lr_output_message does show the source file and line number&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_output_message(&quot;--- lr_output_message: %s&quot;, message);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;----------------- end lr_output_message ---------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // lr_error_message test&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;------------------- lr_error_message -----------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;--- lr_error_message writes a message with an Error log level&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_error_message(&quot;--- lr_error_message: %s&quot;, message);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;----------------- end lr_error_message ---------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// lr_log_message test&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;------------------- lr_log_message ------------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;--- lr_log_message does not send messages to the output window and could therefore reduce network traffic between agent and load generator in some situations&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_log_message(&quot;--- lr_log_message: %s&quot;, message);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;----------------- end lr_log_message ---------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// lr_debug_message test&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;------------------- lr_debug_message -----------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;--- lr_debug_message writes a message if the specified log settings are set&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; msgLevel=lr_get_debug_message();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (msgLevel &amp;amp; LR_MSG_CLASS_BRIEF_LOG &amp;nbsp;) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_message(&quot;standard log is enabled&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;} else if (msgLevel &amp;amp; LR_MSG_CLASS_EXTENDED_LOG &amp;nbsp;) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_message(&quot;extended log is enabled&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;} else if (msgLevel &amp;amp; LR_MSG_CLASS_DISABLE_LOG &amp;nbsp;) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_message(&quot;log is disabled&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// log message if brief or extended log are enabled&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_debug_message(LR_MSG_CLASS_BRIEF_LOG | LR_MSG_CLASS_EXTENDED_LOG, &quot;--- lr_debug_message: %s&quot;, &quot;This is written if brief or extended log is enabled&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// disable &amp;nbsp;brief and extended log&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lr_set_debug_message(LR_MSG_CLASS_BRIEF_LOG, LR_SWITCH_OFF);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG, LR_SWITCH_OFF);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// now the debug message should not be written&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_debug_message(LR_MSG_CLASS_BRIEF_LOG | LR_MSG_CLASS_EXTENDED_LOG, &quot;This should not be written to log because brief and extended log are both disabled&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// re-enable extended log&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lr_set_debug_message(LR_MSG_CLASS_EXTENDED_LOG, LR_SWITCH_ON);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;----------------- end lr_debug_message ---------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// lr_vuser_status_message&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// lr_log_message test&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;------------------- lr_vuser_status_message ------------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;--- lr_vuser_status_message updates the status field of the vuser status area. &amp;nbsp;It does not write to the log&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_vuser_status_message(&quot;--- lr_vuser_status_message: %s&quot;, message);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_message(&quot;----------------- end lr_vuser_status_message ---------------------&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Output&lt;/h2&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Running Vuser...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Starting iteration 1.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Starting action Action.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;---------------------- lr_message --------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--- lr_message does not show the source file and line number&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--- lr_message: This is a test message.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;----------------- end lr_message ---------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;------------------- lr_output_message -----------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--- lr_output_message does show the source file and line number&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Action.c(19): --- lr_output_message: This is a test message.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;----------------- end lr_output_message ---------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;------------------- lr_error_message -----------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--- lr_error_message writes a message with an Error log level&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Action.c(25): Error: --- lr_error_message: This is a test message.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;----------------- end lr_error_message ---------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;------------------- lr_log_message ------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--- lr_log_message does not send messages to the output window and could therefore reduce network traffic between agent and load generator in some situations&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--- lr_log_message: This is a test message.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;----------------- end lr_log_message ---------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;------------------- lr_debug_message -----------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--- lr_debug_message writes a message if the specified log settings are set&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;extended log is enabled&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--- lr_debug_message: This is written if brief or extended log is enabled&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;----------------- end lr_debug_message ---------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;------------------- lr_vuser_status_message ------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--- lr_vuser_status_message updates the status field of the vuser status area. &amp;nbsp;It does not write to the log&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;----------------- end lr_vuser_status_message ---------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Ending action Action.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Ending iteration 1.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Ending Vuser...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Starting action vuser_end.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Ending action vuser_end.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Vuser Terminated.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/2446287449023492204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/11/loadrunner-logging-options.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/2446287449023492204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/2446287449023492204'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/11/loadrunner-logging-options.html' title='Loadrunner Logging Options'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-1269867617397807608</id><published>2012-11-01T14:49:00.001-07:00</published><updated>2012-11-01T14:56:16.363-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="async"/><category scheme="http://www.blogger.com/atom/ns#" term="asynchronous"/><category scheme="http://www.blogger.com/atom/ns#" term="callback"/><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="performance center"/><category scheme="http://www.blogger.com/atom/ns#" term="polling"/><category scheme="http://www.blogger.com/atom/ns#" term="waiting"/><title type='text'>Loadrunner Asynchronous Results Polling Using 11.5 Web Async</title><content type='html'>&lt;br /&gt;
Some user action trigger asynchronous server-side operations. &amp;nbsp;The user can then be forced to check for results periodically by polling the server. &amp;nbsp;Loadrunner 11.5 provides asynchronous logic allowing callback functions to be specified which are called when the async call finally returns. &amp;nbsp;The following example gives one example of using the asynchronous callbacks as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Include web_api.h to load some needed symbols&lt;/li&gt;
&lt;li&gt;To capture the time it takes for the async response to come back, specify a global variable showing done state&lt;/li&gt;
&lt;li&gt;Before the async call, set async polling properties using&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: midnightblue;&quot;&gt;web_reg_async_attributes&amp;nbsp;&lt;/span&gt;&lt;/b&gt;such as how often to poll, which callback functions to use, etc.&lt;/li&gt;
&lt;li&gt;Define the callback functions to be called when the async response is returned and update the done state variable in the callback&lt;/li&gt;
&lt;li&gt;Make the async call&lt;/li&gt;
&lt;li&gt;To get the response time, wait until the callback has updated the global state variable&lt;/li&gt;
&lt;li&gt;End the transaction&lt;/li&gt;
&lt;li&gt;Stop the async polling&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The following shows an example of a script doing this, and the next section shows the script&#39;s vugen console output.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;
Script&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: green;&quot;&gt;// Specify include files&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;#ifndef&lt;/span&gt;&amp;nbsp;_GLOBALS_H&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;#define&lt;/span&gt;&amp;nbsp;_GLOBALS_H&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: green;&quot;&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;#include&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;web_api.h&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: green;&quot;&gt;&lt;/span&gt;

&lt;span style=&quot;color: blue;&quot;&gt;#endif&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;//
_GLOBALS_H&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;// End include files&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;// Define a global variable holding done state&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;done;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: midnightblue;&quot;&gt;Action&lt;/span&gt;&lt;/b&gt;()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;web_url&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;wiki&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;URL&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;http://ajaxify.com/run/wiki&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;Resource&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;RecContentType&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;text/html&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;Referer&lt;/span&gt;=&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;Snapshot&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;t37.inf&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;Mode&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;HTML&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;LAST&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; // Initialize the global done state variable, and start the async transaction variable&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;done&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006c36;&quot;&gt;0&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;lr_start_transaction&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;async-call&quot;&lt;/span&gt;);&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: green;&quot;&gt;&amp;nbsp; &amp;nbsp;// Define the request to be handled asynchronously, in this case a &quot;?messages&quot; call&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: green;&quot;&gt;&amp;nbsp; &amp;nbsp;// Specify the polling interval of 5 seconds&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: green;&quot;&gt;&amp;nbsp; &amp;nbsp;// Specify the callback functions that will be called when the response is returned.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: green;&quot;&gt;&amp;nbsp; &amp;nbsp;// The callback functions are defined below.&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: midnightblue;&quot;&gt;web_reg_async_attributes&lt;/span&gt;&lt;/b&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;ID&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;Poll_0&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;URL&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;http://ajaxify.com/run/wiki/content.php?messages&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;Pattern&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;Poll&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;PollIntervalMs&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;5000&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;RequestCB&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;Poll_0_RequestCB&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;ResponseBodyBufferCB&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;Poll_0_ResponseBodyBufferCB&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;ResponseCB&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;Poll_0_ResponseCB&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;LAST&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; // now make the async call.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; // note that the script will not block on this call. &amp;nbsp;processing will continue on past this step while the request is handles asynchronously&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;web_url&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;content.php&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;URL&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;http://ajaxify.com/run/wiki/content.php?messages&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;Resource&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;0&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;RecContentType&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;text/xml&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;Referer&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;http://{host_ajaxify_com}/run/wiki/&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;Snapshot&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;t38.inf&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;Mode&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;HTML&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;LAST&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; // To capture the response time of the async call, wait until the callback is called.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; // Without this, the script would move past and complete the iteration before the callback is called.&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;while&lt;/span&gt;&amp;nbsp;(done==&lt;span style=&quot;color: #006c36;&quot;&gt;0&lt;/span&gt;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;lr_think_time&lt;/span&gt;(&lt;span style=&quot;color: #006c36;&quot;&gt;1&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: green;&quot;&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; // once the callback has been called, end the transaction to get the response time.&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;lr_end_transaction&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;async-call&quot;&lt;/span&gt;,&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;LR_AUTO&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp;// stop the polling&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: midnightblue;&quot;&gt;web_stop_async&lt;/span&gt;&lt;/b&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;ID&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;Poll_0&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;LAST&lt;/span&gt;&lt;/b&gt;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: #006c36;&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;/*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Callback Implementation&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: midnightblue;&quot;&gt;Poll_0_RequestCB&lt;/span&gt;&lt;/b&gt;()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;//enter your implementation
for RequestCB() here&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;&amp;nbsp;WEB_ASYNC_CB_RC_OK;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: midnightblue;&quot;&gt;Poll_0_ResponseBodyBufferCB&lt;/span&gt;&lt;/b&gt;(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;&amp;nbsp;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aLastBufferStr,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aLastBufferLen,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;&amp;nbsp;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aAccumulatedStr,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aHttpStatusCode)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;//enter your implementation
for ResponseBodyBufferCB() here&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // when the response is received, update the global variable&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;done&amp;nbsp;=&amp;nbsp;&lt;span style=&quot;color: #006c36;&quot;&gt;1&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp; // print out the response body and length&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;lr_message&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;in
Poll_0_ResponseBodyBufferCB response body callback&quot;&lt;/span&gt;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;lr_message&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;in
Poll_0_ResponseBodyBufferCB response body callback,&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;&amp;nbsp;lastBufferLen&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;%d&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&amp;nbsp;aLastBufferLen);&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;&amp;nbsp;WEB_ASYNC_CB_RC_OK;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: midnightblue;&quot;&gt;Poll_0_ResponseCB&lt;/span&gt;&lt;/b&gt;(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;&amp;nbsp;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aResponseHeadersStr,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aResponseHeadersLen,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;const&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;&amp;nbsp;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aResponseBodyStr,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aResponseBodyLen,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;aHttpStatusCode)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;//enter your implementation
for ResponseCB() here&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;lr_message&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;in Poll_0_ResponseCB
response callback,&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;&amp;nbsp;headerLen&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;%d&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;&amp;nbsp;bodyLen&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;%d&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&amp;nbsp;aResponseHeadersLen,&amp;nbsp;aResponseBodyLen);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;lr_message&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;in Poll_0_ResponseCB
response callback,&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;&amp;nbsp;header&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;%s&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&amp;nbsp;aResponseHeadersStr);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: #e65700;&quot;&gt;lr_message&lt;/span&gt;(&lt;span style=&quot;color: teal;&quot;&gt;&quot;in Poll_0_ResponseCB
response callback,&lt;/span&gt;&lt;span style=&quot;color: #a71919;&quot;&gt;&amp;nbsp;body&lt;/span&gt;=&lt;b&gt;&lt;span style=&quot;color: #008c00;&quot;&gt;%s&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: teal;&quot;&gt;&quot;&lt;/span&gt;,&amp;nbsp;aResponseBodyStr);&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt;&amp;nbsp;WEB_ASYNC_CB_RC_OK;&lt;br /&gt;
}&lt;span style=&quot;color: green;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;
Console Output&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;Running Vuser...&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Starting
iteration 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Notify: max
connections per server : 6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Starting action
Action.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
web_url(&quot;wiki&quot;) started&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26355]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
Redirecting &quot;http://ajaxify.com/run/wiki&quot; (redirection depth is
0)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId:
MMSG-26694]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16): To
location &quot;http://ajaxify.com/run/wiki/&quot;&amp;nbsp;  [MsgId:
MMSG-26693]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
Found resource &quot;http://ajaxify.com/run/Lib/css/demo.css&quot; in HTML
&quot;http://ajaxify.com/run/wiki/&quot;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26659]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
Found resource &quot;http://ajaxify.com/run/wiki/wiki.css&quot; in HTML
&quot;http://ajaxify.com/run/wiki/&quot;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26659]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
Found resource &quot;http://ajaxify.com/run/Lib/js/util.js&quot; in HTML
&quot;http://ajaxify.com/run/wiki/&quot;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26659]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
Found resource &quot;http://ajaxify.com/run/Lib/js/ajaxCaller.js&quot; in HTML
&quot;http://ajaxify.com/run/wiki/&quot;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26659]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
Found resource &quot;http://ajaxify.com/run/wiki/wiki.js&quot; in HTML
&quot;http://ajaxify.com/run/wiki/&quot;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26659]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
Found resource &quot;http://ajaxify.com/favicon.ico&quot; in HTML
&quot;http://ajaxify.com/run/wiki/&quot;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26659]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
Found resource &quot;http://ajaxify.com/run/Lib/php/button.php&quot; in HTML
&quot;http://ajaxify.com/run/wiki/&quot;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26659]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(16):
web_url(&quot;wiki&quot;) was successful, 22491 body bytes, 2152 header bytes,
24 chunking overhead bytes&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26385]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(26):
Notify: Transaction &quot;polling&quot; started.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(41):
web_reg_async_attributes started&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26355]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(41):
web_reg_async_attributes was successful&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26392]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(50):
web_url(&quot;content.php&quot;) started&amp;nbsp;
&amp;nbsp; [MsgId: MMSG-26355]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(50):
&quot;ID=poll_0&quot; &amp;amp;&amp;amp; &quot;Pattern=Poll&quot; &amp;amp;&amp;amp;
&quot;PollIntervalMs=5000&quot; now applied to
URL=&quot;http://ajaxify.com/run/wiki/content.php?messages&quot; (RelFrameId=1,
Internal ID=10)&amp;nbsp; &amp;nbsp;&amp;nbsp; [MsgId: MMSG-35172]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(50):
Retaining cross-step download of URL=&quot;http://ajaxify.com/run/wiki/content.php?messages&quot;
(RelFrameId=1, Internal ID=10)&amp;nbsp; &amp;nbsp;&amp;nbsp; [MsgId: MMSG-27658]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(50):
web_url(&quot;content.php&quot;) was successful, 0 body bytes, 0 header
bytes&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId:
MMSG-26386]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(62):
lr_think_time: 1.00 seconds.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in Poll_0_ResponseBodyBufferCB
response body callback&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseBodyBufferCB response body callback, lastBufferLen=928&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseBodyBufferCB response body callback&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseBodyBufferCB response body callback, lastBufferLen=0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in Poll_0_ResponseCB
response callback, headerLen=319, bodyLen=928&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseCB response callback, header=HTTP/1.1 200 OK&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Server:
nginx/0.8.53&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Date: Thu, 01 Nov
2012 21:18:42 GMT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Content-Type:
text/xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Transfer-Encoding:
chunked&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Connection:
keep-alive&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;X-Powered-By:
PHP/5.3.5-1ubuntu7.11&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Expires: 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Last-Modified:
Thu, 01 Nov 2012 21:18:42 GMT&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;cache-control:
no-store, no-cache, must-revalidate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Pragma: no-cache&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseCB response callback, body=&amp;lt;messages&amp;gt;&amp;nbsp; &amp;lt;message&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;10&amp;lt;/id&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;lastAuthor&amp;gt;lastAuthor&amp;lt;/lastAuthor&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ranking&amp;gt;100&amp;lt;/ranking&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;content&amp;gt;Wonder%20Wonder%20ffff%0AStuff%20here%20for%20123fdsfd%0Atest%0Avbnvytytry%0Aokadfasdf%0Artyry%0Artyryry%0Arytry%0Adfgvdfg%0A%0Asdfsad%0A%0Asdfsd%0A%0Aghghhgggh%0A%0Atesteste%0A%0AZe%20woiauha%0A%20df%0A%0Axcvx%0AHello%20friends%21%0Ahello%20folks%0Ahi%0Ajiadsasd%0A%0A%0Azzz&amp;lt;/content&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp; &amp;lt;/message&amp;gt;&amp;nbsp; &amp;lt;message&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;2&amp;lt;/id&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;lastAuthor&amp;gt;lastAuthor&amp;lt;/lastAuthor&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ranking&amp;gt;200&amp;lt;/ranking&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;content&amp;gt;ABC%0Aklljljl%0Ak%3Bk%3B%3Bk%3B%0Aggugj%0A%0Affff%0A%0Aasdf%0A%0Abla%0Aqwe%0Aqweqwe%0Ajnknknkjkvfgh%0A&amp;lt;/content&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp; &amp;lt;/message&amp;gt;&amp;nbsp; &amp;lt;message&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;3&amp;lt;/id&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;lastAuthor&amp;gt;lastAuthor&amp;lt;/lastAuthor&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ranking&amp;gt;300&amp;lt;/ranking&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;content&amp;gt;This%20is%20line%201%0AThis%20is%20line%202.%0AEnd%0A.%0Adffdfg123123123%0Aawgaw%0Afsdf%0Atestes%0Aasdfadf%0Aadsasd&amp;lt;/content&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;&amp;nbsp; &amp;lt;/message&amp;gt;&amp;lt;/messages&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(62):
Issuing a &quot;POLL&quot; request for conversation with ID=&quot;poll_0&quot;
and &quot;PollIntervalMs=5000&quot;. Scheduling due at t=13494, URL=&quot;http://ajaxify.com/run/wiki/content.php?messages&quot;&amp;nbsp; &amp;nbsp;&amp;nbsp; [MsgId:
MMSG-35169]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(62):
&quot;ID=poll_0&quot; &amp;amp;&amp;amp; &quot;Pattern=Poll&quot; &amp;amp;&amp;amp;
&quot;PollIntervalMs=5000&quot; now applied to
URL=&quot;http://ajaxify.com/run/wiki/content.php?messages&quot; (RelFrameId=,
Internal ID=11)&amp;nbsp; &amp;nbsp;&amp;nbsp; [MsgId: MMSG-35172]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(67):
Notify: Transaction &quot;polling&quot; ended with &quot;Pass&quot; status
(&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Duration: 4.0431&lt;/span&gt; Think Time: 1.8491 Wasted Time: 0.0121).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(69):
web_stop_async started&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [MsgId: MMSG-26355]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(69):
Notify: Deleting Conversation Information with ID=&quot;poll_0&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(69):
Aborting download of URL
&quot;http://ajaxify.com/run/wiki/content.php?messages&quot; (RelFrameId=,
Internal ID=11) of conversation with ID=&quot;poll_0&quot;&amp;nbsp;  [MsgId:
MMSG-35167]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseBodyBufferCB response body callback&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseBodyBufferCB response body callback, lastBufferLen=0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseCB response callback, headerLen=0, bodyLen=0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseCB response callback, header=&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;in
Poll_0_ResponseCB response callback, body=&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Action.c(69):
web_stop_async was successful&amp;nbsp; &amp;nbsp;&amp;nbsp; [MsgId: MMSG-26392]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Ending action
Action.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Ending iteration
1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Ending Vuser...&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Starting action
vuser_end.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Ending action
vuser_end.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNoSpacing&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;Vuser Terminated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/1269867617397807608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/11/loadrunner-asynchronous-results-polling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/1269867617397807608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/1269867617397807608'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/11/loadrunner-asynchronous-results-polling.html' title='Loadrunner Asynchronous Results Polling Using 11.5 Web Async'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-7717567339407918996</id><published>2012-10-23T16:30:00.000-07:00</published><updated>2012-11-01T14:53:59.695-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="async"/><category scheme="http://www.blogger.com/atom/ns#" term="asynchronous"/><category scheme="http://www.blogger.com/atom/ns#" term="callback"/><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="performance center"/><category scheme="http://www.blogger.com/atom/ns#" term="polling"/><category scheme="http://www.blogger.com/atom/ns#" term="waiting"/><title type='text'>Loadrunner Asynchronous Results Polling</title><content type='html'>Some user action trigger asynchronous server-side operations. &amp;nbsp;The user can then be forced to check for results periodically by polling the server. &amp;nbsp; The following script gives an example of how to do this as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Define variables to specify polling interval and polling timeout.&lt;/li&gt;
&lt;li&gt;Each polling interval, make the call to the server and check the results.&lt;/li&gt;
&lt;li&gt;If the server has returned the finished results, end the polling loop and pass the transaction.&lt;/li&gt;
&lt;li&gt;Otherwise, wait for the next polling interval and repeat.&lt;/li&gt;
&lt;li&gt;If the timeout is hit, end the polling loop and fail the transaction.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2&gt;
Script&lt;/h2&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Action()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int done = 0; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int pollIntervalSec = 1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int timeoutSec = 3;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int secWaited = 0;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;char *response, *expectedResponse;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;expectedResponse = &quot;abc&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lr_start_transaction(&quot;wait_for_data&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // poll the site until expected response is received or timeout is reached&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while (done==0)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // capture response information&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;web_reg_save_param(&quot;responseParam&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&quot;LB=Control: &quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&quot;RB=max&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;LAST );&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // hit the page to be polled&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;web_url(&quot;Test&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&quot;URL=http://www.google.com&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&quot;Resource=0&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&quot;RecContentType=text/html&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&quot;Snapshot=t1.inf&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;LAST);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;// Save respone to string&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;response = lr_eval_string(lr_eval_string(&quot;{responseParam}&quot;));&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;// check string contents to see if done&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;if(strcmp(response,expectedResponse)==0)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;done=1; // set flag to indicate success&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &amp;nbsp;lr_message(&quot;Found expected response=%s&quot;, response);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;lr_end_transaction(&quot;wait_for_data&quot;, LR_PASS);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;// increment time waited&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;secWaited = secWaited + pollIntervalSec;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;// check for timeout&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;if (secWaited &amp;gt; timeoutSec)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;done = 1;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_end_transaction(&quot;wait_for_data&quot;, LR_FAIL);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_error_message(&quot;Wait for data timed out, took longer than %d seconds&quot;, timeoutSec);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;lr_think_time(pollIntervalSec);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
Console Output&lt;/h2&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Starting action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(11): Notify: Transaction &quot;wait_for_data&quot; started.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(15): Registering web_reg_save_param was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26390]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Found resource &quot;http://www.google.com/intl/en_ALL/images/srpr/logo1w.png&quot; in HTML &quot;http://www.google.com&quot; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26659]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Warning -26376: Requested parameter &quot;responseParam&quot; found in 2 different pages/frames. Use web_reg_save_param with more restrictive LB/RB/RelFrameId &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MWAR-26376]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Warning -26373: Parameter &quot;responseParam&quot; saved from a resource (URL=&quot;http://www.google.com/intl/en_ALL/images/srpr/logo1w.png&quot;) &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MWAR-26373]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): web_url(&quot;Test&quot;) highest severity level was &quot;warning&quot;, 12282 body bytes, 1071 header bytes &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26388]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(48): lr_think_time: 1.00 seconds.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(15): Registering web_reg_save_param was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26390]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Resource &quot;http://www.google.com/intl/en_ALL/images/srpr/logo1w.png&quot; is in the cache already and will not be downloaded again &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26655]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): web_url(&quot;Test&quot;) was successful, 4952 body bytes, 400 header bytes &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26386]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(48): lr_think_time: 1.00 seconds.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(15): Registering web_reg_save_param was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26390]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Resource &quot;http://www.google.com/intl/en_ALL/images/srpr/logo1w.png&quot; is in the cache already and will not be downloaded again &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26655]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): web_url(&quot;Test&quot;) was successful, 4952 body bytes, 224 header bytes &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26386]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(48): lr_think_time: 1.00 seconds.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(15): Registering web_reg_save_param was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26390]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Resource &quot;http://www.google.com/intl/en_ALL/images/srpr/logo1w.png&quot; is in the cache already and will not be downloaded again &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26655]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): web_url(&quot;Test&quot;) was successful, 4952 body bytes, 224 header bytes &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26386]&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(45): Notify: Transaction &quot;wait_for_data&quot; ended with &quot;Fail&quot; status (Duration: 4.1903 Think Time: 3.0017 Wasted Time: 0.6545).&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(46): Error: Wait for data timed out, took longer than 3 seconds&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(48): lr_think_time: 1.00 seconds.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Ending action Action.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/7717567339407918996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/10/loadrunner-how-to-poll-for-results.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/7717567339407918996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/7717567339407918996'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/10/loadrunner-how-to-poll-for-results.html' title='Loadrunner Asynchronous Results Polling'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-3906947372568128529</id><published>2012-10-22T16:02:00.002-07:00</published><updated>2012-10-30T12:39:27.960-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="load"/><category scheme="http://www.blogger.com/atom/ns#" term="parallels virtuozzo"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="stability"/><category scheme="http://www.blogger.com/atom/ns#" term="stress"/><category scheme="http://www.blogger.com/atom/ns#" term="virtual machine"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualization"/><category scheme="http://www.blogger.com/atom/ns#" term="vmware"/><category scheme="http://www.blogger.com/atom/ns#" term="xen"/><title type='text'>Virtualization Performance Testing</title><content type='html'>&lt;br /&gt;
Virtualization technologies (such as VMware, Parallels, Xen, KVM, Waratek, etc.) have become very popular for good reasons, including but not limited to the following:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Application density can be increased&lt;/li&gt;
&lt;li&gt;Server resource usage can be maximized&lt;/li&gt;
&lt;li&gt;Hardware costs can be reduced many-fold&lt;/li&gt;
&lt;li&gt;The number of servers required to run the same load can be reduced&lt;/li&gt;
&lt;li&gt;Applications become more portable&lt;/li&gt;
&lt;/ul&gt;
It is critical to do performance, load, and stress testing of a virtualization solution before rolling it out for several reasons:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Different applications behave differently in a virtualized environment and some are more suitable than others&lt;/li&gt;
&lt;li&gt;Performance or stability could be affected in a virtualized environment&lt;/li&gt;
&lt;li&gt;Virtual machine sizing can drastically affect application behavior&lt;/li&gt;
&lt;li&gt;Application configuration can be different when run in a virtualized environment.&lt;/li&gt;
&lt;/ul&gt;
This post gives a brief outline of how to do performance, load and stress testing of a virtualization solution.&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Include online and batch test cases as well as administrative operations&lt;/li&gt;
&lt;li&gt;Test bare metal (physical server) as a baseline to be compared to virtualization results&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;See how many instance of the application can be run on bare metal&lt;/li&gt;
&lt;li&gt;Push bare metal up to server capacity&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;Test virtualization&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Run VMs on the same bare metal server or an equivalent one&lt;/li&gt;
&lt;li&gt;Push one VM up to capacity, then two VMs, then three VMs, etc., up to the highest density desired.&lt;/li&gt;
&lt;li&gt;Capture hypervisor server resource usage metrics (cpu, memory, disk, network)&lt;/li&gt;
&lt;li&gt;Verify that VM performance compares reasonably relative to bare metal&lt;/li&gt;
&lt;li&gt;Verify that VM capacity compares reasonably relative to bare metal&lt;/li&gt;
&lt;li&gt;Verify that VM application stability compares reasonably relative to bare metal&lt;/li&gt;
&lt;li&gt;If performance or stability is not acceptable, see if application tuning is needed or virtual machine tuning is needed.&lt;/li&gt;
&lt;li&gt;Include stability tests in which high load is applied for an extended period of time.&lt;/li&gt;
&lt;li&gt;Perform administrative operations while system is under high load.&lt;/li&gt;
&lt;li&gt;Once performance and stability are acceptable, publish the results and the tuning and configuration needed to achieve acceptable results.&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/3906947372568128529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/10/how-to-load-test-virtualization-solution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3906947372568128529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3906947372568128529'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/10/how-to-load-test-virtualization-solution.html' title='Virtualization Performance Testing'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-5254672059029358785</id><published>2012-10-22T15:48:00.001-07:00</published><updated>2012-10-23T11:48:33.720-07:00</updated><title type='text'>Loadrunner How to Read Parameters From Javascript</title><content type='html'>Sometimes it is necessary to read data from the contents of a javascript file rather than an html page. &amp;nbsp;The javascript may have certain variables created at compile time that it is useful to correlate. &amp;nbsp;Because the javascript file may show up as extra resources in an http call, the contents of the file are not visible to web_reg_save_param, etc. &amp;nbsp;However, by adding an additional call, the javascript can be read as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Get the .js file with a web_url call&lt;/li&gt;
&lt;li&gt;Set content type to &quot;text/js&quot;&lt;/li&gt;
&lt;li&gt;Set resource=1&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The following gives an example of the method described.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Script&lt;/h2&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Action()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; web_reg_save_param(&quot;jsText&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&quot;LB=&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;&quot;RB=&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;        &lt;/span&gt;LAST );&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; web_url(&quot;Test-Read-JS-File&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;URL=https://test.server.com/scripts/test.js&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Resource=1&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;RecContentType=text/js&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;Snapshot=t1.inf&quot;,&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LAST);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Console Output&lt;/h2&gt;
&lt;br /&gt;
Starting action Action.&lt;br /&gt;
Action.c(4): Registering web_reg_save_param was successful &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26390]&lt;br /&gt;
Action.c(9): Notify: Saving Parameter &quot;jsText = HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nCache-Control: max-age=2592000\r\nContent-Type: application/x-javascript; charset=utf-8\r\nDate: Mon, 22 Oct 2012 22:39:40 GMT\r\nExpires: Wed, 21 Nov 2012 22:39:40 GMT\r\nLast-Modified: Fri, 19 Oct 2012&lt;br /&gt;
...&lt;br /&gt;
Action.c(9): web_url(&quot;Test-Read-JS-File&quot;) was successful, 614175 body bytes, 321 header bytes &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-26386]&lt;br /&gt;
Ending action Action.</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/5254672059029358785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/10/loadrunner-how-to-read-parameters-from.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/5254672059029358785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/5254672059029358785'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/10/loadrunner-how-to-read-parameters-from.html' title='Loadrunner How to Read Parameters From Javascript'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-2462544379863151802</id><published>2012-09-14T15:52:00.002-07:00</published><updated>2012-09-14T15:52:37.648-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="crash"/><category scheme="http://www.blogger.com/atom/ns#" term="dump"/><category scheme="http://www.blogger.com/atom/ns#" term="heap"/><category scheme="http://www.blogger.com/atom/ns#" term="heap dump"/><category scheme="http://www.blogger.com/atom/ns#" term="histogram"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="jmap"/><category scheme="http://www.blogger.com/atom/ns#" term="memory leak"/><title type='text'>Dumping Very Large Java Heaps</title><content type='html'>When a java application has either a memory leak or much higher than expected memory utilization, it is necessary to obtain heap information to identify the source of the problem. &amp;nbsp;A heap dump is ideal because it can then be analyzed using various tools. &amp;nbsp;However, with very large java heaps, perhaps &amp;gt; 100GB, a heap dump may be impractical for several reasons:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;the heap dump may crash the java process before completing&lt;/li&gt;
&lt;li&gt;the heap dump may hang indefinitely&lt;/li&gt;
&lt;li&gt;there may not be enough disk space to accomodate the dump&lt;/li&gt;
&lt;li&gt;the dump may be so large that analysis tools are unable to process it&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
One solution to this scenario is to use the jmap utility to obtain a heap dump histogram from the running process. &amp;nbsp;This appears to be very lightweight, completing quickly on very large heaps and generating a very small summary analysis file that can be used for troubleshooting.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The syntax for doing this is the following, where &amp;lt;pid&amp;gt; is the process id of the java process.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
jmap -histo &amp;lt;pid&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The output is a very nice summary showing, for each class in the heap, the class name, the number of instances, and the size in bytes, for example as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;num &amp;nbsp; &amp;nbsp; #instances &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #bytes &amp;nbsp;class name&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;----------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;1: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 70052 &amp;nbsp; &amp;nbsp; &amp;nbsp; 11118624 &amp;nbsp;&amp;lt;constMethodKlass&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;2: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 70052 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8422160 &amp;nbsp;&amp;lt;methodKlass&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;3: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6320 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8258472 &amp;nbsp;&amp;lt;constantPoolKlass&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;4: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6320 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6117216 &amp;nbsp;&amp;lt;instanceKlassKlass&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;5: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;116656 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5732520 &amp;nbsp;&amp;lt;symbolKlass&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;6: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 17467 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5729824 &amp;nbsp;[I&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;7: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5682 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5050352 &amp;nbsp;&amp;lt;constantPoolCacheKlass&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;8: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 57275 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4818512 &amp;nbsp;[C&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;9: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 24818 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2660384 &amp;nbsp;[B&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 10: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 59327 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1898464 &amp;nbsp;java.lang.String&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 11: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2847 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1766720 &amp;nbsp;[J&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 12: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2978 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1542008 &amp;nbsp;&amp;lt;methodDataKlass&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 13: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 11687 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 797256 &amp;nbsp;[S&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 14: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 13307 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 706440 &amp;nbsp;[Ljava.lang.Object;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 15: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6777 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 704808 &amp;nbsp;java.lang.Class&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 16: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 18904 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 604928 &amp;nbsp;java.util.HashMap$Entry&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 17: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10088 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 522512 &amp;nbsp;[[I&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 18: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5736 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 499408 &amp;nbsp;[Ljava.util.HashMap$Entry;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 19: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12838 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 410816 &amp;nbsp;java.util.Hashtable$Entry&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 20: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5580 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 267840 &amp;nbsp;java.util.HashMap&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 21: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 428 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 249952 &amp;nbsp;&amp;lt;objArrayKlassKlass&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 22: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5888 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 235520 &amp;nbsp;java.util.concurrent.ConcurrentHashMap$Segment&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 23: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6243 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 199776 &amp;nbsp;java.util.concurrent.locks.ReentrantLock$NonfairSync&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; 24: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5888 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 146544 &amp;nbsp;[Ljava.util.concurrent.ConcurrentHashMap$HashEntry;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; ...&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;3029: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 &amp;nbsp;sun.awt.X11.XToolkit$4&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;3030: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 &amp;nbsp;java.util.Collections$EmptyIterator&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;3031: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 &amp;nbsp;com.sun.tools.visualvm.core.explorer.ExplorerContextMenuFactory&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;3032: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 &amp;nbsp;sun.reflect.generics.tree.TypeVariableSignature&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;3033: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 &amp;nbsp;sun.awt.X11.XKeyboardFocusManagerPeer$1&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;3034: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 &amp;nbsp;org.openide.xml.EntityCatalog$Forwarder&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Total &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;714547 &amp;nbsp; &amp;nbsp; &amp;nbsp; 74730032&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/2462544379863151802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/09/dumping-very-large-java-heaps.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/2462544379863151802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/2462544379863151802'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/09/dumping-very-large-java-heaps.html' title='Dumping Very Large Java Heaps'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-4392185608034852806</id><published>2012-09-14T12:40:00.001-07:00</published><updated>2012-09-14T12:40:28.652-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="encoding"/><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="unicode"/><category scheme="http://www.blogger.com/atom/ns#" term="utf-8"/><category scheme="http://www.blogger.com/atom/ns#" term="vugen"/><title type='text'>Loadrunner Convert To Unicode or UTF-8</title><content type='html'>The following shows how to convert strings in Vugen to unicode or UTF-8, which is necessary for certain applications with globalization functionality.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Script&lt;/h3&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Action()&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;char *converted_buffer_unicode = NULL;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// convert to unicode&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_convert_string_encoding(&quot;Text to convert to unicode&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LR_ENC_SYSTEM_LOCALE,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LR_ENC_UNICODE,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;paramUnicode&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// convert to UTF-8&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_convert_string_encoding(&quot;Text to convert to utf8&quot;,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LR_ENC_SYSTEM_LOCALE,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;LR_ENC_UTF8,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&quot;paramUtf8&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Console Output&lt;/h3&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Running Vuser...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Starting iteration 1.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Starting action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(6): Notify: Saving Parameter &quot;paramUnicode = T\x00e\x00x\x00t\x00 \x00t\x00o\x00 \x00c\x00o\x00n\x00v\x00e\x00r\x00t\x00 \x00t\x00o\x00 \x00u\x00n\x00i\x00c\x00o\x00d\x00e\x00\x00\x00&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(12): Notify: Saving Parameter &quot;paramUtf8 = Text to convert to utf8\x00&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Ending action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Ending iteration 1.&lt;/span&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/4392185608034852806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/09/loadrunner-convert-to-unicode-or-utf-8.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4392185608034852806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4392185608034852806'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/09/loadrunner-convert-to-unicode-or-utf-8.html' title='Loadrunner Convert To Unicode or UTF-8'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-4588943773208013823</id><published>2012-09-13T17:00:00.001-07:00</published><updated>2012-09-13T17:01:12.927-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="capacity"/><category scheme="http://www.blogger.com/atom/ns#" term="cpu"/><category scheme="http://www.blogger.com/atom/ns#" term="crash"/><category scheme="http://www.blogger.com/atom/ns#" term="disk"/><category scheme="http://www.blogger.com/atom/ns#" term="downstream service"/><category scheme="http://www.blogger.com/atom/ns#" term="errors"/><category scheme="http://www.blogger.com/atom/ns#" term="fault tolerance"/><category scheme="http://www.blogger.com/atom/ns#" term="infrastructure"/><category scheme="http://www.blogger.com/atom/ns#" term="instability"/><category scheme="http://www.blogger.com/atom/ns#" term="memory"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="outage"/><category scheme="http://www.blogger.com/atom/ns#" term="peak"/><category scheme="http://www.blogger.com/atom/ns#" term="server resource usage"/><category scheme="http://www.blogger.com/atom/ns#" term="stability"/><category scheme="http://www.blogger.com/atom/ns#" term="stress test"/><category scheme="http://www.blogger.com/atom/ns#" term="throughput"/><title type='text'>How to Test the Stability of an Application</title><content type='html'>&lt;br /&gt;
Testing the stability of an application is critical. &amp;nbsp;It can prevent system outages by identifying problems before they occur in production. &amp;nbsp;Outages can severely damage a business, in some cases permanently. &amp;nbsp;The following outline provides a reasonable template for testing application stability.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Ramp load up incrementally to the breaking point of the system. &amp;nbsp;Do not stop at expected peak load because bursts or unexpected traffic can entail load far higher than anticipated.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Load should cover critical dimensions such as transaction rate/throughput, connections, concurrent users, range of use cases/functionality&lt;/li&gt;
&lt;li&gt;When the application breaks, investigate what broke&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If the test infrastructure broke (test client capacity hit, test network capacity hit, test case crashed, etc.), the test infrastructure must be repaired so that the application is what breaks, not the test infrastructure.&lt;/li&gt;
&lt;li&gt;If the application broke, diagnose the type of breakage and what broke.&lt;/li&gt;
&lt;li&gt;Is breakage recoverable?&lt;/li&gt;
&lt;li&gt;Does breakage affect already connected users, or just block new users?&lt;/li&gt;
&lt;li&gt;Did the application code break (errors, deadlocks, thread blocking, etc.)?&lt;/li&gt;
&lt;li&gt;Was a system resource limit hit (cpu, memory, network, disk)?&lt;/li&gt;
&lt;li&gt;If system resource limits were not hit, does the application need to be fixed so that it is not the bottleneck? &amp;nbsp;The system should scale up so that system limits are hit, whether CPU, network, disk I/O, or network bandwidth.&lt;/li&gt;
&lt;li&gt;Did a downstream service break?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;How can the downstream service be improved to provide more capacity and stability?&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Did the system just slow down, remaining functional?&lt;/li&gt;
&lt;li&gt;Is a restart required, and what must be restarted (services, server, downstream services, etc.)?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Can the system be scaled out or scaled up to improve the capacity? &amp;nbsp;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If not, why not? &amp;nbsp;Is there an architectural limitation preventing further scalability? &amp;nbsp;How can scalability be improved?&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;From the test determine the peak capacity of the application and verify that proper production monitoring is in place to detect this threshold.&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Run at near peak capacity for an extended period of time (this could be one day or more depending on uptime requirements)&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Is the application stable when run for a long time or does it eventually crash?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Why does it crash?&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Does performance degrade over time?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Why does it degrade?&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;Perform administrative operations that may need to be performed during production usage while system is near peak load.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Is the system stable when this happens?&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Perform the full suite of functional tests while the system is near peak load.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Is the system stable when this happens?&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
Document the results of the test carefully. &amp;nbsp;Do not ignore crashes and instability. &amp;nbsp;Spend the time and effort to understand the behavior and harden the application to behave well under any conditions, anticipated or not.</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/4588943773208013823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/09/how-to-test-stability-of-application.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4588943773208013823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4588943773208013823'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/09/how-to-test-stability-of-application.html' title='How to Test the Stability of an Application'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-1881576091755076039</id><published>2012-09-13T16:10:00.002-07:00</published><updated>2012-09-13T16:17:04.569-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iteration number"/><category scheme="http://www.blogger.com/atom/ns#" term="load generator name"/><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="timestamp"/><category scheme="http://www.blogger.com/atom/ns#" term="unique"/><category scheme="http://www.blogger.com/atom/ns#" term="unique id"/><category scheme="http://www.blogger.com/atom/ns#" term="unique name"/><category scheme="http://www.blogger.com/atom/ns#" term="vugen"/><category scheme="http://www.blogger.com/atom/ns#" term="vuser id"/><title type='text'>Loadrunner Unique Names</title><content type='html'>It is useful to be able to create human-readable unique names to be used for filenames, database keys, logging, etc. &amp;nbsp;One way to do this is to create a string with the following information:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;load generator name&lt;/li&gt;
&lt;li&gt;vuser id&lt;/li&gt;
&lt;li&gt;iteration number&lt;/li&gt;
&lt;li&gt;timestamp&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
This can be done easily as follows:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;get load generator name using lr_get_host_name()&lt;/li&gt;
&lt;li&gt;get vuser id using lr_whoami()&lt;/li&gt;
&lt;li&gt;get iteration number using a parameter of type iteration&lt;/li&gt;
&lt;li&gt;get current timestamp using lr_save_datetime()&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
The following script shows how to do this.&lt;/div&gt;
&lt;h3&gt;
Script&lt;/h3&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Action()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int id&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;char *host;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // get load generator name&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;host = lr_get_host_name( );&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//lr_output_message(&quot;Host: %s&quot;, host);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt; // get vuser id&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_whoami(&amp;amp;id, NULL, NULL);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//lr_message( &quot;Vuser id: %d&quot;, &amp;nbsp;id);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // for iteration add a parameter named &quot;Iteration&quot; of type Iteration&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//lr_output_message(lr_eval_string(&quot;Iteration: {Iteration}&quot;));&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // get timestamp, formatted as wanted&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lr_save_datetime(&quot;%m-%d-%Y-%I%M%S%p&quot;, DATE_NOW, &quot;now&quot;);&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//lr_output_message(lr_eval_string(&quot;Time: {now}&quot;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // now generate the nice, readable unique id&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_output_message(lr_eval_string(&quot;Host-%s-VuserId-%d-Iteration-{Iteration}-Time-{now}&quot;),host, id);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Output&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Host-generator02-VuserId-1-Iteration-1-Time-09-13-2012-035856PM&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-17999]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Host-generator02-VuserId-2-Iteration-1-Time-09-13-2012-035856PM&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-17999]&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Host-generator02-VuserId-1-Iteration-2-Time-09-13-2012-035857PM&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Host-generator02-VuserId-2-Iteration-2-Time-09-13-2012-035857PM&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-17999&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(20): Host-generator02-VuserId-1-Iteration-3-Time-09-13-2012-035858PM&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[MsgId: MMSG-17999]&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/1881576091755076039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/09/loadrunner-unique-names.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/1881576091755076039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/1881576091755076039'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/09/loadrunner-unique-names.html' title='Loadrunner Unique Names'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-791622093426358140</id><published>2012-09-13T15:36:00.002-07:00</published><updated>2012-09-13T16:16:26.795-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="analysis"/><category scheme="http://www.blogger.com/atom/ns#" term="charting"/><category scheme="http://www.blogger.com/atom/ns#" term="custom metrics"/><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="metrics"/><category scheme="http://www.blogger.com/atom/ns#" term="vugen"/><title type='text'>Loadrunner Charting Custom Metrics</title><content type='html'>In Loadrunner, you can chart your own custom metrics easily by using the function&amp;nbsp;lr_user_data_point. &amp;nbsp;These could include calls to the server to collect system stats, application metrics based on responses, or anything at all. &amp;nbsp;The custom metrics are then available in Loadrunner Analysis. &amp;nbsp;The following provides an example:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Script&lt;/h3&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;double getMyMetric();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;double mymetric;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;int i;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for (i=0;i&amp;lt;100;i++) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mymetric = getMyMetric();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_user_data_point(&quot;mymetric&quot;, mymetric);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;lr_log_message( &quot;--- Added custom metric value = %f&quot;, mymetric );&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;double getMyMetric()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; int randomInt = (rand() % 100)+1; &amp;nbsp;// Get a random number 1 - 100&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;double mymetric = randomInt / 100.0; // Return a double between 0 &amp;nbsp;and 1&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return mymetric;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Console Output&lt;/h3&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Running Vuser...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Starting iteration 1.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Starting action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(10): Notify: Data Point &quot;mymetric&quot; value = 0.4800.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;--- Added custom metric value = 0.480000&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;Action.c(10): Notify: Data Point &quot;mymetric&quot; value = 0.7900.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;--- Added custom metric value = 0.790000&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Analysis Output&lt;/h3&gt;
The custom metric is then available in analysis:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUBcYumlRv0roErEuFp0tuDX2G-fd4BgvW2t3xI_DVEmL2nG1ZcnlGBj_82VoB7llqJR1a_hAk0R_exntQ8nUqUR5NAjImxfcN9T2hl3Yakt2abxNi9UsE7buVwW6GMSHPV48NaqFD81gV/s1600/mymetric-add.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUBcYumlRv0roErEuFp0tuDX2G-fd4BgvW2t3xI_DVEmL2nG1ZcnlGBj_82VoB7llqJR1a_hAk0R_exntQ8nUqUR5NAjImxfcN9T2hl3Yakt2abxNi9UsE7buVwW6GMSHPV48NaqFD81gV/s200/mymetric-add.JPG&quot; width=&quot;182&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
A chart can be generated showing the trend of the custom data points added during the test:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWAtQ4-oU5JgFaS49I1liqaFm40dG0fvamo_OB3vqq0SaLPrlPXRGjfglxEEAeJeuHOvREaxF0iNw3sJUcOz4An4Y09l7E7J_OqED9VH8bZNAWeNrHhlmDUFNwNF-2Zwc29cyVYnkwLyXT/s1600/mymetric-chart.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;208&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWAtQ4-oU5JgFaS49I1liqaFm40dG0fvamo_OB3vqq0SaLPrlPXRGjfglxEEAeJeuHOvREaxF0iNw3sJUcOz4An4Y09l7E7J_OqED9VH8bZNAWeNrHhlmDUFNwNF-2Zwc29cyVYnkwLyXT/s400/mymetric-chart.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/791622093426358140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/09/loadrunner-charting-custom-metrics.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/791622093426358140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/791622093426358140'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/09/loadrunner-charting-custom-metrics.html' title='Loadrunner Charting Custom Metrics'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUBcYumlRv0roErEuFp0tuDX2G-fd4BgvW2t3xI_DVEmL2nG1ZcnlGBj_82VoB7llqJR1a_hAk0R_exntQ8nUqUR5NAjImxfcN9T2hl3Yakt2abxNi9UsE7buVwW6GMSHPV48NaqFD81gV/s72-c/mymetric-add.JPG" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-4543102376437640137</id><published>2012-09-13T15:03:00.003-07:00</published><updated>2013-01-30T16:32:46.495-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="current time"/><category scheme="http://www.blogger.com/atom/ns#" term="datetime"/><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="timestamp"/><category scheme="http://www.blogger.com/atom/ns#" term="vugen"/><title type='text'>Loadrunner Current Timestamp</title><content type='html'>In Vugen, it is helpful to include a datetime with log messages, either informational or errors. &amp;nbsp;This can be done very easily using the lr_save_datetime function. &amp;nbsp;The timestamp can also be formatted in many different ways using the format codes commented out in the script below. &amp;nbsp; The following script shows how this can be done:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Script&lt;/h3&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Action()&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// handle an event such as an error or important message including a timestamp&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_save_datetime(&quot;%m/%d/%Y %I:%M:%S %p&quot;, DATE_NOW, &quot;now&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;lr_output_message(lr_eval_string(&quot;{now}: My important message here.&quot;));&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &amp;nbsp;Format codes for lr_save_datetime&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%a &amp;nbsp;day of week, using locale&#39;s abbreviated weekday names&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%A &amp;nbsp;day of week, using locale&#39;s full weekday names&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%b &amp;nbsp;month, using locale&#39;s abbreviated month names&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%B &amp;nbsp;month, using locale&#39;s full month names&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%c &amp;nbsp;date and time as %x %X&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%d &amp;nbsp;day of month (01-31)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%H &amp;nbsp;hour (00-23)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%I &amp;nbsp;hour (00-12)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%j &amp;nbsp;number of day in year (001-366)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%m &amp;nbsp;month number (01-12)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%M &amp;nbsp;minute (00-59)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%p &amp;nbsp;locale&#39;s equivalent of AM or PM, whichever is appropriate&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%S &amp;nbsp;seconds (00-59)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%U &amp;nbsp;week number of year (01-52), Sunday is the first day of the week. Week number 01 is the first week with four or more January days in it.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%w &amp;nbsp;day of week; Sunday is day 0&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%W &amp;nbsp;week number of year (01-52), Monday is the first day of the week. Week number 01 is the first week with four or more January days in it.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%x &amp;nbsp;date, using locale&#39;s date format&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%X &amp;nbsp;time, using locale&#39;s time format&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%y &amp;nbsp;year within century (00-99)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%Y &amp;nbsp;year, including century (for example, 1988)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%Z &amp;nbsp;time zone abbreviation&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;%% &amp;nbsp;to include the &quot;%&quot; character in your output string&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return 0;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Console Output&lt;/h3&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Running Vuser...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Starting iteration 1.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Starting action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Action.c(29): &lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;09/13/2012 02:56:41 PM: My important message here.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Ending action Action.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Ending iteration 1.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/4543102376437640137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/09/how-to-include-current-time-in-message.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4543102376437640137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4543102376437640137'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/09/how-to-include-current-time-in-message.html' title='Loadrunner Current Timestamp'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-4885375396871268416</id><published>2012-08-27T14:05:00.002-07:00</published><updated>2012-09-18T14:36:41.876-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="black swan"/><category scheme="http://www.blogger.com/atom/ns#" term="fat tail"/><category scheme="http://www.blogger.com/atom/ns#" term="fault tolerance"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="performance testing"/><category scheme="http://www.blogger.com/atom/ns#" term="resilience"/><category scheme="http://www.blogger.com/atom/ns#" term="return on investment"/><category scheme="http://www.blogger.com/atom/ns#" term="ROI"/><category scheme="http://www.blogger.com/atom/ns#" term="stability"/><title type='text'>Performance Testing ROI and Black Swans</title><content type='html'>&lt;br /&gt;
What return on investment/ROI can be expected from performance testing? &amp;nbsp;There are two categories of &quot;return&quot; for performance and stability testing. &lt;br /&gt;
&lt;br /&gt;
One category of return is a simple, quantifiable return in which performance testing results allow the amount of hardware required to be reduced in a couple of ways:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Application tuning and optimization allowing the same amount of hardware to handle additional traffic&lt;/li&gt;
&lt;li&gt;Proof of hardware overcapacity, showing that a reduced amount of hardware would be sufficient to handle peak traffic, allowing hardware inventory to be reduced &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
The second category of return is not a return so much as an insurance policy, or protection against a fat tail or black swan event. &amp;nbsp;In this case, you are protecting yourself against system stability bugs whose consequences can be absolutely catastrophic, up to the complete destruction of the business.&lt;br /&gt;
&lt;br /&gt;
Consider the example of Knight Capital&#39;s botched software rollout on August 1st, 2012. &amp;nbsp;The rollout triggered unexpected trades that cost the firm $440 million, depleting its operating capital. &amp;nbsp;This weakened position allowed outside investors to take a controlling 70% stake in the company as terms of its bailout.&lt;br /&gt;
&lt;br /&gt;
By doing performance and stability testing, catastrophic stability bugs may be missed due to limitations of the test environment or test data, or failure to anticipate the nature of production behavior leading to the disaster. &amp;nbsp;However, if a catastophic stability bug is discovered and fixed, which happens regularly, a black swan event has been quietly and successfully sidestepped. &amp;nbsp;The value is avoiding a devastating black swan event that brings down the company through loss of customers, loss of reputation, lawsuits, takeovers, etc. &amp;nbsp;Not to mention more individual losses such as loss of job, bonus, promotion, career, etc. &amp;nbsp;The cost of the testing is fixed and predicable, simply the cost of supporting ongoing performance testing, in effect the insurance policy premiums protecting against the black swan.&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsnVUzJj4KOQxWVLZ23NJHUn0y50U6BG5xtg_E0nDQhfy15nzGErdybhj2yxAlWPYnj9y1erND-itK_LMyNG113KWd_zgmwL5C4_TTAZrnOuhlHcrUbrUtdmgtfqeYikOOkuBPJAACOaSy/s1600/swan.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; display: inline !important; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsnVUzJj4KOQxWVLZ23NJHUn0y50U6BG5xtg_E0nDQhfy15nzGErdybhj2yxAlWPYnj9y1erND-itK_LMyNG113KWd_zgmwL5C4_TTAZrnOuhlHcrUbrUtdmgtfqeYikOOkuBPJAACOaSy/s200/swan.JPG&quot; width=&quot;152&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/4885375396871268416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/08/performance-testing-roi-and-black-swans.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4885375396871268416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/4885375396871268416'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/08/performance-testing-roi-and-black-swans.html' title='Performance Testing ROI and Black Swans'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsnVUzJj4KOQxWVLZ23NJHUn0y50U6BG5xtg_E0nDQhfy15nzGErdybhj2yxAlWPYnj9y1erND-itK_LMyNG113KWd_zgmwL5C4_TTAZrnOuhlHcrUbrUtdmgtfqeYikOOkuBPJAACOaSy/s72-c/swan.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-6831553796295221654</id><published>2012-08-24T10:16:00.001-07:00</published><updated>2012-09-13T16:15:08.205-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="monitoring"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="timestamp"/><title type='text'>How To Add a Timestamp to Each Line of Output on Linux</title><content type='html'>For performance monitoring on linux, you typically would like your shell script metrics and statistics that are logged periodically to include the timestamp with each line output. &amp;nbsp;That way, the information can later be correlated with other system events such as event log entries or system errors. &amp;nbsp;There are two basic scenarios.&lt;br /&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Your shell script is echoing information to standard output periodically in some loop&lt;/li&gt;
&lt;li&gt;You are just calling a program such as vmstat directly that outputs information periodically&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Adding a timestamp in the two scenarios can be handled easily as follows:&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;
Monitoring Loop&lt;/h3&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
If your monitoring script includes a loop that is outputting stats periodically, a timestamp can be added to each line by capturing the output of the &quot;date&quot; command and then adding that information to the output line.&lt;/div&gt;
&lt;div&gt;
The output of the date command can be captured by using forward single quotes, as follows:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;savedDate = `date`&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here is an example of a script making use of this technique:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;#&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# output stats every $1 seconds until stopped&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;#&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;if [ &quot;$1&quot; == &quot;&quot; ] ; then&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; echo &quot;syntax= .stats.sh &amp;lt;intervalSeconds&amp;gt;&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; exit&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;fi&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;time=$1&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;echo &quot;Time , QueriesPerSechod&quot; &amp;gt; mysql-stats.log&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;while :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;do&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; qps=`mysql -u mysql -e &quot;show status&quot; | awk &#39;{if ($1 == &quot;Queries&quot;) print $2}&#39;`&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; date=`date`&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; echo &quot;$date , $qps&quot; &amp;gt;&amp;gt; mysql-stats.log&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; sleep $time&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;done&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here is an example of the output:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Time , QueriesPerSecond&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Wed Aug &amp;nbsp;8 16:11:58 PDT 2012 , 3029&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Wed Aug &amp;nbsp;8 16:12:08 PDT 2012 , 18195&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Wed Aug &amp;nbsp;8 16:12:18 PDT 2012 , 18903&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
...&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Direct Output&lt;/h3&gt;
&lt;div&gt;
If you are just calling an app or script such as vmstat, iostat, etc., that outputs stats periodically for you, you can achieve the same effect by piping the command through an app that prepends a timestamp to each line. &amp;nbsp;For example, to prepend timestamps to the output from vmstat, free, and iostat, you would do the following, depending on a script &quot;timestamp.sh&quot; with the timestamp prepend behavior:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# free&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;free -g -s 10 | ./timestamp.sh &amp;gt; free.log &amp;amp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# vmstat&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;vmstat 10 | ./timestamp.sh &amp;gt; vmstat.log &amp;amp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;# iostat&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;iostat 10 | ./timestamp.sh &amp;gt; iostat.log &amp;amp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This would give output such as the following:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;07/23/12 10:41:44,procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;07/23/12 10:41:44, r &amp;nbsp;b &amp;nbsp; swpd &amp;nbsp; free &amp;nbsp; buff &amp;nbsp;cache &amp;nbsp; si &amp;nbsp; so &amp;nbsp; &amp;nbsp;bi &amp;nbsp; &amp;nbsp;bo &amp;nbsp; in &amp;nbsp; cs us sy id wa st&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;07/23/12 10:41:44, 6 &amp;nbsp;0 &amp;nbsp; 2736 3381052 505844 159601296 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;62 &amp;nbsp; 119 &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp;1 &amp;nbsp;6 &amp;nbsp;1 93 &amp;nbsp;0 &amp;nbsp;0&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: xx-small;&quot;&gt;07/23/12 10:41:54, 2 &amp;nbsp;0 &amp;nbsp; 2736 3358836 505900 159601728 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 102 &amp;nbsp; &amp;nbsp;25 &amp;nbsp;640 &amp;nbsp;414 &amp;nbsp;1 &amp;nbsp;0 99 &amp;nbsp;0 &amp;nbsp;0&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: xx-small;&quot;&gt;07/23/12 10:42:04, 7 &amp;nbsp;0 &amp;nbsp; 2736 3329736 505948 159601936 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp; 9 &amp;nbsp; &amp;nbsp;32 &amp;nbsp;927 1263 &amp;nbsp;1 &amp;nbsp;0 98 &amp;nbsp;0 &amp;nbsp;0&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The timestamp.sh script is as follows:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;#!/usr/bin/perl&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;#while (&amp;lt;&amp;gt;) { print localtime() . &quot;: $_&quot;; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;while (&amp;lt;&amp;gt;)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$secpad = sprintf( &quot;%02d&quot;, $sec );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$minpad = sprintf( &quot;%02d&quot;, $min );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$hourpad = sprintf( &quot;%02d&quot;, $hour );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$monpad = sprintf( &quot;%02d&quot;, $mon );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$mdaypad = sprintf( &quot;%02d&quot;, $mday );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$yearpad = sprintf( &quot;%02d&quot;, ($year + 1900) % 100 );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$time = &quot;$monpad\/$mdaypad\/$yearpad $hourpad:$minpad:$secpad&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;print $time . &quot;,$_&quot; ;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;#17/04/112 16:40:14&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/6831553796295221654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/08/how-to-add-timestamp-to-each-line-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/6831553796295221654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/6831553796295221654'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/08/how-to-add-timestamp-to-each-line-of.html' title='How To Add a Timestamp to Each Line of Output on Linux'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-3223271072002835873</id><published>2012-08-14T10:39:00.002-07:00</published><updated>2012-09-13T16:14:42.254-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="currentTimeMillis"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="measuring"/><category scheme="http://www.blogger.com/atom/ns#" term="microsecond"/><category scheme="http://www.blogger.com/atom/ns#" term="millisecond"/><category scheme="http://www.blogger.com/atom/ns#" term="nanosecond"/><category scheme="http://www.blogger.com/atom/ns#" term="nanoTime"/><category scheme="http://www.blogger.com/atom/ns#" term="response time"/><title type='text'>How to Measure Response Times in Java</title><content type='html'>This post describes how to measure response time in Java. &amp;nbsp;You can use either System.currentTimeMillis() or System.nanoTime() depending on what response times you will be recording. &lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
System.currentTimeMillis is accurate to 1 millisecond, so is typically appropriate if you have response times on the order of magnitude of 1 second or more. &amp;nbsp;Using currentTimeMillis, you could report results in seconds with three decimals of precision, such as 1.205 seconds, or results in milliseconds with zero decimals of precision, such as 1205 milliseconds.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
nanoTime is typically appropriate if you want to report response times with greater precision than milliseconds, useful in cases in which differences of a fraction of a millisecond or microsecond are needed.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The following java code sample shows how to capture the response time of a transaction using both currentTimeMillis and nanoTime, showing the results in milliseconds with three decimals of precision.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Code Sample&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;* Created with IntelliJ IDEA.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;* User: ehammer&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import java.net.*;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;import java.io.*;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public class TimerTest&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public static final Double NANO_TO_MILLIS = 1000000.0;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; public static void main(String[] args) throws MalformedURLException, IOException&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // start timer&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long nanoStart = System.nanoTime();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long milliStart = System.currentTimeMillis();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // do work to be timed&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doWork();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // stop timer&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long nanoEnd = System.nanoTime();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long milliEnd = System.currentTimeMillis();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // report response times&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long nanoTime = nanoEnd - nanoStart;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long milliTime = milliEnd - milliStart;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reportResponseTimes(nanoTime, milliTime);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private static void reportResponseTimes(long nanoTime, long milliTime)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // convert nanoseconds to milliseconds and display both times with three digits of precision (microsecond)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String nanoFormatted = String.format(&quot;%,.3f&quot;, nanoTime / NANO_TO_MILLIS);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String milliFormatted = String.format(&quot;%,.3f&quot;, milliTime / 1.0 );&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Milliseconds using nanoTime(): &quot; + nanoFormatted);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;Milliseconds using currentTimeMillis: &quot; + milliFormatted);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; private static void doWork() throws MalformedURLException, IOException&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL url = new URL(&quot;http://www.google.com/&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URLConnection conn = url.openConnection();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (in.readLine() != null) {}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; in.close();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Sample Output&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Milliseconds using nanoTime(): 277.913&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Milliseconds using currentTimeMillis: 278.000&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Process finished with exit code 0&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Walk Through&lt;/h3&gt;
&lt;div&gt;
Timer is started as follows:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long nanoStart = System.nanoTime();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long milliStart = System.currentTimeMillis();&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The transaction to be timed is then run.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The timer is stopped:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long nanoEnd = System.nanoTime();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long milliEnd = System.currentTimeMillis();&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The difference between end and start is taken:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long nanoTime = nanoEnd - nanoStart;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; long milliTime = milliEnd - milliStart;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Results are formatted in the desired precision, in this case as milliseconds with three decimals of precision (microsecond precision):&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String nanoFormatted = String.format(&quot;%,.3f&quot;, nanoTime / NANO_TO_MILLIS);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String milliFormatted = String.format(&quot;%,.3f&quot;, milliTime / 1.0 );&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Note that nanoTime results show microsecond precision, while currentTimeMillis shows results in 1 millisecond increments.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/3223271072002835873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/08/how-to-measure-response-times-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3223271072002835873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/3223271072002835873'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/08/how-to-measure-response-times-in-java.html' title='How to Measure Response Times in Java'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-1660547337541741756</id><published>2012-08-13T14:02:00.004-07:00</published><updated>2012-09-13T16:14:04.493-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="capturing"/><category scheme="http://www.blogger.com/atom/ns#" term="fiddler"/><category scheme="http://www.blogger.com/atom/ns#" term="http"/><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="network"/><category scheme="http://www.blogger.com/atom/ns#" term="proxy"/><category scheme="http://www.blogger.com/atom/ns#" term="timeline"/><category scheme="http://www.blogger.com/atom/ns#" term="visualization"/><category scheme="http://www.blogger.com/atom/ns#" term="vugen"/><title type='text'>Recording Loadrunner Traffic in Fiddler</title><content type='html'>It can be useful to capture loadrunner http traffic in fiddler. &amp;nbsp;This can be useful, for example, for seeing the timeline of http requests, which ones are slow, what sort of parallelism exists, if any, etc. &amp;nbsp;It can also be useful to compare the vugen timeline of requests to the same information captured directly from the browser, as vugen may not match browser behavior as expected, by serializing what is sent asynchronously in parallel by the browser, etc.&lt;br /&gt;
&lt;br /&gt;
Vugen can be configured in Runtime Settings, Internet Protocol, Proxy, Use Proxy Server, address=localhost, port=8888.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv1HsTkQwHDqa9WKLzlrJUZuMPQO9-hwDfvrZWj-Eo3SrT9OTHv8OOGlDgLWJfycV9QOaPhoNBIEhPkdRWyWj4sfm7L_zzc3bDZh3-8ImjF5G2upM4NFiMISVkZ_8-ZdnCSSZCX3osP2Vx/s1600/vugen-proxy.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;554&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv1HsTkQwHDqa9WKLzlrJUZuMPQO9-hwDfvrZWj-Eo3SrT9OTHv8OOGlDgLWJfycV9QOaPhoNBIEhPkdRWyWj4sfm7L_zzc3bDZh3-8ImjF5G2upM4NFiMISVkZ_8-ZdnCSSZCX3osP2Vx/s640/vugen-proxy.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
You then put breakpoints in the script before and after the section you want to record, run the script in vugen to the first breakpoint (with logging disabled), start capturing traffic in fiddler, run the script to the second breakpoint and stop capturing traffic in fiddler. &amp;nbsp;You can then see a visualization of the request pipeline in fiddler for your loadrunner traffic:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT9FUY3aPhTsQVwKR_CekFXhUAusdDKn_iMWLH0DqGP0aRg0QGRLKY1ofXCZg7EH6N1Rf8udShgkWfnHcqxahBuECEPXOnj5tAAG_2PyOAUlihW-VwDx03Pf7_kOXcSOaecf3CoxWAMDbv/s1600/fiddler.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;390&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT9FUY3aPhTsQVwKR_CekFXhUAusdDKn_iMWLH0DqGP0aRg0QGRLKY1ofXCZg7EH6N1Rf8udShgkWfnHcqxahBuECEPXOnj5tAAG_2PyOAUlihW-VwDx03Pf7_kOXcSOaecf3CoxWAMDbv/s640/fiddler.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
It is also a good idea to capture the traffic by running the script from the controller on the load generator to reduce vugen overhead. &amp;nbsp;You will get a more compact and realistic pipeline that way.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
You can then record the same transaction manually using the web browser for comparison to loadrunner.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/1660547337541741756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/08/recording-loadrunner-traffic-in-fiddler.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/1660547337541741756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/1660547337541741756'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/08/recording-loadrunner-traffic-in-fiddler.html' title='Recording Loadrunner Traffic in Fiddler'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv1HsTkQwHDqa9WKLzlrJUZuMPQO9-hwDfvrZWj-Eo3SrT9OTHv8OOGlDgLWJfycV9QOaPhoNBIEhPkdRWyWj4sfm7L_zzc3bDZh3-8ImjF5G2upM4NFiMISVkZ_8-ZdnCSSZCX3osP2Vx/s72-c/vugen-proxy.JPG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-5225749336589285427</id><published>2012-07-05T10:49:00.002-07:00</published><updated>2012-09-13T16:13:29.679-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="loadrunner"/><category scheme="http://www.blogger.com/atom/ns#" term="sub-transaction"/><category scheme="http://www.blogger.com/atom/ns#" term="vugen"/><title type='text'>LoadRunner Sub-Transactions</title><content type='html'>Often in a loadrunner script, many transactions are of a common type, like &quot;save&quot; or &quot;search&quot; or &quot;report_view&quot;. &amp;nbsp;These common operations need to be aggregated for reporting purposes. &amp;nbsp;You want to easily create a chart showing, for example &quot;Search Response Time&quot; or &quot;Searches Per Second&quot; or &quot;Search Response Time (percentile)&quot;.&lt;br /&gt;
&lt;br /&gt;
One easy way to do this is to run the following perl script which will take any transaction and wrap it in a second &quot;sub-transaction&quot; of the name input. &amp;nbsp;For example, suppose you have the following in your Action.c:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_start_transaction(&quot;Search1&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_end_transaction(&quot;Search1&quot;, LR_AUTO);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_start_transaction(&quot;Search2&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_end_transaction(&quot;Search2&quot;, LR_AUTO);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following running the script in the directory with your Action.c file, passing the parameter &quot;search&quot; (&quot;perl lr-subtrans.pl search&quot;), you would now have:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_start_transaction(&quot;Search1&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_start_transaction(&quot;search&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_end_transaction(&quot;search&quot;, LR_AUTO);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_end_transaction(&quot;Search1&quot;, LR_AUTO);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_start_transaction(&quot;Search2&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_start_transaction(&quot;search&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_end_transaction(&quot;search&quot;, LR_AUTO);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;lr_end_transaction(&quot;Search2&quot;, LR_AUTO);&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This would then allow very easy reporting of the aggregate search transaction. &amp;nbsp;After running the script, you have to go in and remove the sub-transactions around transactions that are not relevant, like perhaps &quot;login&quot;, &quot;homepage&quot;, &quot;back&quot;, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;Script&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;# &amp;nbsp;lr-subtrans.pl&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;# &amp;nbsp;Loadrunner add subtransaction script&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;use File::Copy;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;$transname = $ARGV[0];&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;$actionfile = &quot;Action.c&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;$backupfile = &quot;Action.c.bak&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;$outfile = &quot;Action.c.subtrans.txt&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;if ($transname eq &quot;-?&quot; or $transname eq &quot;/?&quot; or $transname eq &quot;-help&quot; or $transname eq &quot;/help&quot; or $transname eq &quot;&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;die &quot;USAGE: perl lr-subtrans.pl &amp;lt;transactionName&amp;gt; &amp;nbsp; &amp;nbsp; (Note: each transaction will be wrapped with a transaction named &amp;lt;transactionName&amp;gt;)\n&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;copy($actionfile, $backupfile) or die &quot;File cannot be copied.&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;open (INFILE, $actionfile) or die &quot;Can&#39;t open $actionfile&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;open (OUTFILE, &quot;&amp;gt;$outfile&quot;) or die &quot;can&#39;t open $outfile&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;while ($line = &amp;lt;INFILE&amp;gt;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;# Add server parameter and default check&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if ($line =~ &quot;lr_start_transaction&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;print OUTFILE $line;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;print OUTFILE &quot;\tlr_start_transaction(\&quot;$transname\&quot;); \n&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;# BIIT ID (&quot;SESSION ID&quot;) RULE&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;elsif ($line =~ &quot;lr_end_transaction&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;print OUTFILE &quot;\tlr_end_transaction(\&quot;$transname\&quot;, LR_AUTO); \n&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;print OUTFILE $line;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;print OUTFILE $line;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;close (INFILE);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;close (OUTFILE);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;# Copy Action.c.correlated.txt to Action.c&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;copy($outfile, $actionfile) or die &quot;Copy failed: $!&quot;;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/5225749336589285427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/07/loadrunner-sub-transactions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/5225749336589285427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/5225749336589285427'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/07/loadrunner-sub-transactions.html' title='LoadRunner Sub-Transactions'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4288665368936417675.post-8568130229146708707</id><published>2012-06-04T15:45:00.004-07:00</published><updated>2012-09-13T16:13:06.662-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="distribution chart"/><category scheme="http://www.blogger.com/atom/ns#" term="histogram"/><category scheme="http://www.blogger.com/atom/ns#" term="response time"/><category scheme="http://www.blogger.com/atom/ns#" term="SLA"/><category scheme="http://www.blogger.com/atom/ns#" term="trend"/><title type='text'>Reporting Response Times -  Percentile Distributions and Trends</title><content type='html'>Response time metrics can be very misleading. &amp;nbsp;An average of 2 seconds can mask occasional very high values that could be relevant to performance goals. &amp;nbsp;It can also mask cyclical trends. &amp;nbsp;The same is true of reporting median or specific percentiles such as 95th percentile. &amp;nbsp;An informative response time report should include two elements:&lt;br /&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Response time percentile distribution&lt;/li&gt;
&lt;li&gt;Response time trends with enough granularity to see spikes and patterns&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Here is an example of these two elements:&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Response Time Percentile Distribution&lt;/h2&gt;
&lt;div&gt;
The distribution chart shows clearly what percentage of response times might be above the response time goal.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1qPnpQDGNSYgESFyqQgK5g9NQvSjcf8JvYmb9n9vqghnKM21-lPXgNyJQ9Sov3gPq7dmpnlmbVDpfGUf5PwxWYqp2xfj9Zb5zDi5eowjnc8OcZm3sPsJPvvSc-UXQN8i4-uGprygp4oZm/s1600/response-time-percentiles.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1qPnpQDGNSYgESFyqQgK5g9NQvSjcf8JvYmb9n9vqghnKM21-lPXgNyJQ9Sov3gPq7dmpnlmbVDpfGUf5PwxWYqp2xfj9Zb5zDi5eowjnc8OcZm3sPsJPvvSc-UXQN8i4-uGprygp4oZm/s1600/response-time-percentiles.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;172&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1qPnpQDGNSYgESFyqQgK5g9NQvSjcf8JvYmb9n9vqghnKM21-lPXgNyJQ9Sov3gPq7dmpnlmbVDpfGUf5PwxWYqp2xfj9Zb5zDi5eowjnc8OcZm3sPsJPvvSc-UXQN8i4-uGprygp4oZm/s400/response-time-percentiles.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
Response Time Trend&lt;/h2&gt;
&lt;div&gt;
The trend chart shows clearly an upward trend over time, an important property that would be lost in any single response time metric. &amp;nbsp;It also includes enough granularity to show the distribution pattern of response time spikes.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxHOs1_Hf16mXEe7BzYiPTwS99YVd1j5NBmN8JboJoAENzQ3_VY3IIaZsPLq1PRcQ1W58SYWlH2AWAfj6_Uxs8lnrLxKn5zFhQb34B1TZ0l0ugdaT8JAwwfXoVrW_Wu0siAwJNFIyXVy_K/s1600/response-time-trend.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;171&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxHOs1_Hf16mXEe7BzYiPTwS99YVd1j5NBmN8JboJoAENzQ3_VY3IIaZsPLq1PRcQ1W58SYWlH2AWAfj6_Uxs8lnrLxKn5zFhQb34B1TZ0l0ugdaT8JAwwfXoVrW_Wu0siAwJNFIyXVy_K/s400/response-time-trend.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sub-second.blogspot.com/feeds/8568130229146708707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sub-second.blogspot.com/2012/06/reporting-response-times-percentile.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/8568130229146708707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4288665368936417675/posts/default/8568130229146708707'/><link rel='alternate' type='text/html' href='http://sub-second.blogspot.com/2012/06/reporting-response-times-percentile.html' title='Reporting Response Times -  Percentile Distributions and Trends'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1qPnpQDGNSYgESFyqQgK5g9NQvSjcf8JvYmb9n9vqghnKM21-lPXgNyJQ9Sov3gPq7dmpnlmbVDpfGUf5PwxWYqp2xfj9Zb5zDi5eowjnc8OcZm3sPsJPvvSc-UXQN8i4-uGprygp4oZm/s72-c/response-time-percentiles.JPG" height="72" width="72"/><thr:total>2</thr:total></entry></feed>