<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Performance Testing Professional</title>
	
	<link>http://www.perftesting.co.uk</link>
	<description>IT Performance Testing explained in plain English</description>
	<lastBuildDate>Tue, 21 May 2013 16:14:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/PerformanceTestingProfessional" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="performancetestingprofessional" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">PerformanceTestingProfessional</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Creating JMeter Test Plans with Fiddler</title>
		<link>http://www.perftesting.co.uk/creating-jmeter-test-plans-with-fiddler/2013/03/01/</link>
		<comments>http://www.perftesting.co.uk/creating-jmeter-test-plans-with-fiddler/2013/03/01/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 16:40:47 +0000</pubDate>
		<dc:creator>Derek Stafford</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[JMeter]]></category>
		<category><![CDATA[fiddler]]></category>
		<category><![CDATA[jmeter]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=3606</guid>
		<description><![CDATA[Sometimes it’s not possible to use the JMeter Proxy to record your Thread Group.  Sometimes the client application does not support proxies or, maybe you want to replay a functional test script using Selenium Web Driver or another tool.  Whilst the the script is running you may need to record the HTTP/HTTPS traffic  to generate a Thread Group and perform tasks such as auto-insertion of Transaction Controllers. One way to achieve these goals is to use Fiddler for the recording and then export the recorded sessions by writing a Fiddler extension.  This will give you full control over the generation of a JMeter Test Plan. Creating a basic Fiddler export extension In this article I will demonstrate how we can utilise Fiddler extension capabilities to export the sessions recorded by Fiddler to a JMeter .jmx file. As your own requirements for exporting to JMeter may differ from mine I will offer only a basic example that merely creates a .jmx file containing only JMeter HTTP Sampler entries.  The ultimate aim of course is to create a complete Thread Group or, even a Test Plan. A basic Fiddler export extension can be created very simply using Microsoft Visual Studio Professional or [...]]]></description>
			<content:encoded><![CDATA[<div>
<p><span style="font-size: 13px;line-height: 19px">Sometimes it’s not possible to use the JMeter Proxy to record your Thread Group.  Sometimes the client application does not support proxies or, maybe you want to replay a functional test script using Selenium Web Driver or another tool.  Whilst the the script is running you may need to record the HTTP/HTTPS traffic  to generate a Thread Group and perform tasks such as auto-insertion of Transaction Controllers.</span></p>
</div>
<p>One way to achieve these goals is to use Fiddler for the recording and then export the recorded sessions by writing a Fiddler extension.  This will give you full control over the generation of a JMeter Test Plan.</p>
<h1><span style="color: #3366ff">Creating a basic Fiddler export extension</span></h1>
<p>In this article I will demonstrate how we can utilise Fiddler extension capabilities to export the sessions recorded by Fiddler to a JMeter .jmx file.</p>
<p>As your own requirements for exporting to JMeter may differ from mine I will offer only a basic example that merely creates a .jmx file containing only JMeter HTTP Sampler entries.  The ultimate aim of course is to create a complete Thread Group or, even a Test Plan.</p>
<p>A basic Fiddler export extension can be created very simply using Microsoft Visual Studio Professional or Visual C# Express.</p>
<ol start="1">
<li>Start Visual Studio.</li>
<li>Create a new Project of type <strong>Visual C# Class Library</strong></li>
<li>Right-click the project&#8217;s <strong>References</strong> folder in the <strong>Solution Explorer</strong></li>
<li>Choose the <strong>Browse</strong> tab and find <strong>Fiddler.exe</strong> in the <strong>C:\Program Files\Fiddler2</strong> folder.</li>
<li>Click <strong>Ok</strong> to add the reference.</li>
</ol>
<h1><span style="color: #3366ff">The main JMeterExporter class</span></h1>
<p>First we must create the class that will be loaded by Fiddler when the Export Sessions option is selected.  Modify the default class1.cs (or create a new class) in your project as follows.</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Windows.Forms;
using Fiddler;
// [1]
[assembly: Fiddler.RequiredVersion(&quot;4.4.0.0&quot;)]

namespace FiddlerExtensions
{
    /// &lt;summary&gt;
    /// Uses the Fiddler GUI to obtain the filename to export and writes to the
    /// Fiddler log tab, so it cannot be used with FiddlerCore.
    /// &lt;/summary&gt;
    // [2]
    [ProfferFormat(&quot;JMeter&quot;, &quot;JMeter .jmx Format&quot;)]
    public class JMeterExporter : ISessionExporter
    {
        public bool ExportSessions(string sFormat, Session[] oSessions, Dictionary&lt;string, object&gt; dictOptions,
                                    EventHandler&lt;ProgressCallbackEventArgs&gt; evtProgressNotifications)
        {
            bool bResult = true;
            string sFilename = null;

            // [3] Ask the Fiddler GUI to obtain the filename to export to
            sFilename = Fiddler.Utilities.ObtainSaveFilename(&quot;Export As &quot; + sFormat, &quot;JMeter Files (*.jmx)|*.jmx&quot;);

            if (String.IsNullOrEmpty(sFilename)) return false;

            if (!Path.HasExtension(sFilename)) sFilename = sFilename + &quot;.jmx&quot;;

            try
            {

                Encoding encUTF8NoBOM = new UTF8Encoding(false);
                // [4]
                JMeterTestPlan jMeterTestPlan = new JMeterTestPlan(oSessions, sFilename);
                System.IO.StreamWriter sw = new StreamWriter(sFilename, false, encUTF8NoBOM);
                // [5]
                sw.Write(jMeterTestPlan.Jmx);
                sw.Close();

                Fiddler.FiddlerApplication.Log.LogString(&quot;Successfully exported sessions to JMeter Test Plan&quot;);
                Fiddler.FiddlerApplication.Log.LogString(String.Format(&quot;\t{0}&quot;, sFilename));
            }
            catch (Exception eX)
            {
                Fiddler.FiddlerApplication.Log.LogString(eX.Message);
                Fiddler.FiddlerApplication.Log.LogString(eX.StackTrace);
                bResult = false;
            }
            return bResult;
        }

        public void Dispose()
        {
        }
    }

}
</pre>
<p>[1] You must specify somewhere in your code the minimum version of Fiddler with which your code is compatible.</p>
<p>[2] Here is where you specify what will appear in the list of export formats when the user selects “File &gt; Export Sessions &gt; All Sessions…” from within Fiddler.</p>
<p>[3] After selecting the JMeter export option, Fiddler will prompt the user to enter a filename to which the export will be saved.</p>
<p>[4] Here we instantiate a class called JMeterTestPlan and pass to the constructor the output filename and the list of sessions recorded by Fiddler.</p>
<p>[5] Call the JMeterTestPlan to return the recorded sessions in jmx format.</p>
<h1><span style="color: #3366ff">The JMeterTestPlan class</span></h1>
<p>The JMeter Test Plan .jmx format is XML, but as far as I can tell, it does not have a published definition.  I have therefore resorted to simply interrogating the format manually and then written code that outputs correctly formatted strings.</p>
<p>Create a new class called JMeterTestPlan.cs in your project as follows.</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.Xml.Linq;
using System.IO;

namespace FiddlerExtensions
{
    /// &lt;summary&gt;
    /// A simple representation of a basic JMeterTestPlan
    /// &lt;/summary&gt;
    public class JMeterTestPlan
    {
        // [1]
        private SessionList sessionList;
        private Fiddler.Session[] sessions; // A Fiddler session represents a request/response pair

        public JMeterTestPlan()
        {
            sessions = new Fiddler.Session[0];
            sessionList = new SessionList(sessions);
        }

        public JMeterTestPlan(Fiddler.Session[] oSessions, string outputFilename)
        {
            this.sessions = oSessions;
            sessionList = new SessionList(oSessions);
        }

        // [2] Return the final formatted JMX string
        public string Jmx
        {
            get
            {
                StringBuilder sb = new StringBuilder();
                sb.Append(&quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot;?&gt;\n&quot;);
                // [3] Linq used to prettify the XML output because it's
                // just a plain string with no formatting/indenting
                XDocument doc = XDocument.Parse(this.Xml);
                sb.Append(doc.ToString());
                return sb.ToString();
            }
        }

        // Traverse all objects and request their XML representations.
        private string Xml
        {
            get
            {
                StringBuilder sb = new StringBuilder();
                // based upon the version I was using at the time of development
                sb.Append(&quot;&lt;jmeterTestPlan version=\&quot;1.2\&quot; properties=\&quot;2.3\&quot;&gt;&quot;);
                // [4]
                sb.Append(sessionList.Xml);
                sb.Append(&quot;&lt;/jmeterTestPlan&gt;&quot;);
               return sb.ToString();
            }
        }
    }

    /// &lt;summary&gt;
    ///  [5] This class represents a list of HTTP Sampler nodes
    /// &lt;/summary&gt;
    public class SessionList
    {
        private Fiddler.Session[] sessions;

        public SessionList()
        {
            sessions = new Fiddler.Session[0];
        }

        public SessionList(Fiddler.Session[] oSessions)
        {
            this.sessions = oSessions;
        }

        // Return the HTTP Sampler nodes
        public string Xml
        {
            get
            {
                StringBuilder sb = new StringBuilder();
                if (sessions.Length &gt; 0)
                {
                    // [6]
                    sb.Append(&quot;&lt;hashTree&gt;&quot;);
                    foreach (Fiddler.Session session in sessions)
                    {
                        HTTPSamplerProxy httpSamplerProxy = new HTTPSamplerProxy(session);
                        sb.Append(httpSamplerProxy.Xml);
                    }
                    sb.Append(&quot;&lt;/hashTree&gt;&quot;);
                }
                return sb.ToString();
            }
        }
    }

    /// &lt;summary&gt;
    /// This class represents a HTTP Sampler node
    /// &lt;/summary&gt;
    public class HTTPSamplerProxy
    {
        Fiddler.Session session;

        public HTTPSamplerProxy(Fiddler.Session session)
        {
            this.session = session;
        }

        // [7] Return the HTTP Request node
        public string Xml
        {
            get
            {
                StringBuilder sb = new StringBuilder();
                sb.Append(String.Format(&quot;&lt;HTTPSamplerProxy guiclass=\&quot;HttpTestSampleGui\&quot; &quot;
                          + &quot;testclass=\&quot;HTTPSamplerProxy\&quot; testname=\&quot;{0}\&quot; enabled=\&quot;true\&quot;&gt;&quot;
                          , Path));
                sb.Append(&quot;&lt;boolProp name=\&quot;HTTPSampler.postBodyRaw\&quot;&gt;true&lt;/boolProp&gt;&quot;);
                sb.Append(&quot;&lt;elementProp name=\&quot;HTTPsampler.Arguments\&quot; elementType=\&quot;Arguments\&quot;&gt;&quot;);
                sb.Append(&quot;&lt;collectionProp name=\&quot;Arguments.arguments\&quot;&gt;&quot;);
                sb.Append(&quot;&lt;elementProp name=\&quot;\&quot; elementType=\&quot;HTTPArgument\&quot;&gt;&quot;);
                sb.Append(&quot;&lt;boolProp name=\&quot;HTTPArgument.always_encode\&quot;&gt;false&lt;/boolProp&gt;&quot;);
                sb.Append(String.Format(&quot;&lt;stringProp name=\&quot;Argument.value\&quot;&gt;{0}&lt;/stringProp&gt;&quot;, RequestBody));
                sb.Append(&quot;&lt;stringProp name=\&quot;Argument.metadata\&quot;&gt;=&lt;/stringProp&gt;&quot;);
                sb.Append(&quot;&lt;/elementProp&gt;&quot;);
                sb.Append(&quot;&lt;/collectionProp&gt;&quot;);
                sb.Append(&quot;&lt;/elementProp&gt;&quot;);
                sb.Append(String.Format(&quot;&lt;stringProp name=\&quot;HTTPSampler.domain\&quot;&gt;{0}&lt;/stringProp&gt;&quot;, session.host));
                sb.Append(String.Format(&quot;&lt;stringProp name=\&quot;HTTPSampler.port\&quot;&gt;{0}&lt;/stringProp&gt;&quot;, Port));
                sb.Append(&quot;&lt;stringProp name=\&quot;HTTPSampler.connect_timeout\&quot;&gt;&lt;/stringProp&gt;&quot;);
                sb.Append(&quot;&lt;stringProp name=\&quot;HTTPSampler.response_timeout\&quot;&gt;&lt;/stringProp&gt;&quot;);
                sb.Append(String.Format(&quot;&lt;stringProp name=\&quot;HTTPSampler.protocol\&quot;&gt;{0}&lt;/stringProp&gt;&quot;
                          , session.oRequest.headers.UriScheme));
                sb.Append(&quot;&lt;stringProp name=\&quot;HTTPSampler.contentEncoding\&quot;&gt;&lt;/stringProp&gt;&quot;);
                sb.Append(String.Format(&quot;&lt;stringProp name=\&quot;HTTPSampler.path\&quot;&gt;{0}&lt;/stringProp&gt;&quot;, Path));
                sb.Append(String.Format(&quot;&lt;stringProp name=\&quot;HTTPSampler.method\&quot;&gt;{0}&lt;/stringProp&gt;&quot;
                          , session.oRequest.headers.HTTPMethod.ToUpper()));
                sb.Append(&quot;&lt;boolProp name=\&quot;HTTPSampler.follow_redirects\&quot;&gt;true&lt;/boolProp&gt;&quot;);
                sb.Append(&quot;&lt;boolProp name=\&quot;HTTPSampler.auto_redirects\&quot;&gt;false&lt;/boolProp&gt;&quot;);
                sb.Append(&quot;&lt;boolProp name=\&quot;HTTPSampler.use_keepalive\&quot;&gt;true&lt;/boolProp&gt;&quot;);
                sb.Append(&quot;&lt;boolProp name=\&quot;HTTPSampler.DO_MULTIPART_POST\&quot;&gt;false&lt;/boolProp&gt;&quot;);
                sb.Append(&quot;&lt;boolProp name=\&quot;HTTPSampler.monitor\&quot;&gt;false&lt;/boolProp&gt;&quot;);
                sb.Append(&quot;&lt;stringProp name=\&quot;HTTPSampler.embedded_url_re\&quot;&gt;&lt;/stringProp&gt;&quot;);
                sb.Append(&quot;&lt;/HTTPSamplerProxy&gt;&quot;);
                sb.Append(&quot;&lt;hashTree/&gt;&quot;);
                return sb.ToString();
            }
        }

        private string Path
        {
            get
            {
                return System.Net.WebUtility.HtmlEncode(session.PathAndQuery);
            }
        }

        private string getPort()
        {
            int port = session.port;
            string protocol = session.oRequest.headers.UriScheme; ;
            if (protocol.ToLower() == (&quot;https&quot;) &amp;&amp; port == 443)
            {
                return &quot;&quot;;
            }
            if (protocol.ToLower() == (&quot;http&quot;) &amp;&amp; port == 80)
            {
                return &quot;&quot;;
            }
            return port.ToString();
        }

        private string Port
        {
            get
            {
                return getPort();
            }
        }

        private string RequestBody
        {
            get
            {
                return System.Net.WebUtility.HtmlEncode(session.GetRequestBodyAsString());
            }
        }

    }
}
</pre>
<p>[1] The JMeterTestPlan class has a SessionList object that holds all the recorded sessions passed in by Fiddler.</p>
<p>[2] The Jmx method is called from the JMeterExporter [5] class.</p>
<p>[3] Call XDocument to prettify the xml output by JMeterTestPlan.</p>
<p>[4] Append the xml output from the SessionList object to the JMeterTestPlan xml.</p>
<p>[5] The SessionList class is a list of recorded sessions and returns constructed xml containing HTTPSamplerProxy nodes.</p>
<p>[6] A new indented node in JMeter jmx is defined by a &lt;hashTree&gt; entry.  The end of indentation is indicated with a &lt;/hashTree&gt; entry.</p>
<p>[7] The xml for an individual HTTPSamplerProxy node is created here.</p>
<h1><span style="color: #3366ff">Building and deploying your extension</span></h1>
<ol>
<li>Close Fiddler.</li>
<li>Make sure you target <strong>AnyCPU</strong> when building your extension.</li>
<li>Build your extension in Debug mode and copy the outputs, JmeterExporter.dll and JmeterExporter.pdb, to either <strong>%ProgramFiles%\Fiddler2\ImportExport\</strong> (available to all users) or, <strong>%USERPROFILE%\Documents\Fiddler2\ImportExport\</strong> (available only to the current user).  Deploying the debug version with the .pdb file ensures that any error generated by your extension will report the line numbers of the offending code.</li>
<li>Start Fiddler and capture some traffic.</li>
<li>Stop capturing and select “File &gt;&gt; Export Session &gt;&gt; All Sessions…” and export to JMeter.<a href="http://www.perftesting.co.uk/wp-content/uploads/2013/03/point5a.png"><img class=" wp-image-3634 alignnone" src="http://www.perftesting.co.uk/wp-content/uploads/2013/03/point5a.png" alt="" width="565" height="259" /></a><img class=" wp-image-3635 alignnone" src="http://www.perftesting.co.uk/wp-content/uploads/2013/03/point5b.png" alt="" width="374" height="154" /></li>
<li>Open a blank test plan in JMeter and create a Thread Group.</li>
<li>Right-click the Thread Group and select Merge.<a href="http://www.perftesting.co.uk/wp-content/uploads/2013/03/point7.png"><img class=" wp-image-3633 alignnone" src="http://www.perftesting.co.uk/wp-content/uploads/2013/03/point7.png" alt="" width="409" height="461" /></a></li>
<li>Navigate to the exported Jmx file and merge into your test plan.  The recorded requests will be merged into your test plan as child requests of the Thread Group.<a href="http://www.perftesting.co.uk/wp-content/uploads/2013/03/point8.png"><img class="wp-image-3632 alignnone" src="http://www.perftesting.co.uk/wp-content/uploads/2013/03/point8.png" alt="" width="565" height="224" /></a></li>
</ol>
<h1></h1>
<h1><span style="color: #3366ff">Debugging your extension</span></h1>
<p>As mentioned  earlier you should build your extension in Debug mode.  You must also set a number of Fiddler preferences in order to capture and log any exceptions thrown by your extension.  Using Fiddler’s QuickExec box, execute the following two commands:</p>
<pre class="brush: plain; title: ; notranslate">

prefs set fiddler.debug.extensions.showerrors True
prefs set fiddler.debug.extensions.verbose True
</pre>
<p>Any exceptions will now be logged  to Fiddler’s Log tab.</p>
<h1><span style="color: #3366ff">Extending the basic extension</span></h1>
<p>There are many ways in which you could extend the functionality of this extension.</p>
<h2><span style="color: #3366ff">Export a complete Thread Group or Test Plan</span></h2>
<p>This would involve viewing the jmx file of an existing test plan containing a Thread Group and then working out what xml needs generating to create a Thread Group entry.  It’s then just a matter of adding to your code to create these extra elements.  You could name the Thread Group based upon the output filename of the jmx.</p>
<p>Keep a skeleton JMeter Test Plan containing the basic configuration elements, listeners etc and just merge in your new or updated Thread Groups after you record them.</p>
<h2><span style="color: #3366ff">Assign more meaningful names to the HTTP Samplers</span></h2>
<p>For instance, if the HTTP requests recorded were RESTful or Web Service calls then you could easily give them shorter names, based upon the service call, rather than the URL’s full path.</p>
<h2><span style="color: #3366ff">Generate Transaction Controllers for your test plan</span></h2>
<p>If you are recording manually using Fiddler then you could use Fiddler’s Comment feature to mark Transactions as you record.  The comment feature allow you to add a comment to a selected session.  Your export code can detect these comments by accessing the following property of a session:</p>
<pre class="brush: csharp; title: ; notranslate">

    foreach (Fiddler.Session session in sessions)
    {
        if (session.oFlags.ContainsKey(&quot;ui-comments&quot;))
        {
            // create a Transaction Controller entry with name =
            // session.oFlags.ContainsKey(&quot;ui-comments&quot;)
        }
        // continue with processing session
    }
</pre>
<p>If you are recording a replaying functional test script e.g. Selenium Web Driver or Windows UI Automation (WPF) then you can insert dummy HTTP calls into your code that will be captured by Fiddler.  Simply ensure that your exporter code processes these dummy calls and turns them into Transaction Controllers.  Here is an example of a dummy call I use in my Windows UI Automation scripts:</p>
<pre class="brush: csharp; title: ; notranslate">
public static void StartTransaction(string transaction)
{
    HttpWebRequest transactionRequest = (HttpWebRequest)WebRequest.Create(&quot;http://auto-transaction/&quot; + transaction);
    transactionRequest.Method = &quot;GET&quot;;
    try
    {
        HttpWebResponse transactionResponse = (HttpWebResponse)transactionRequest.GetResponse();
    }
    catch { }
}
</pre>
<p>I then process these in my exporter code:</p>
<pre class="brush: csharp; title: ; notranslate">
    foreach (Fiddler.Session session in sessions)
    {
        if (session.host.StartsWith(&quot;auto-transaction&quot;))
        {
            transactionName = session.PathAndQuery.Remove(0, 1); // remove &quot;/&quot; from start of path
            // create a Transaction Controller entry with name =
            // transactionName
        }
        // continue with processing session
    }
</pre>
<h2><span style="color: #3366ff">Important Notes</span></h2>
<p>The hardest thing to get right when constructing the jmx file is the placement of &lt;hashTree&gt; tags.<br />
<a href="http://www.perftesting.co.uk/wp-content/uploads/2013/03/Untitled2.png"><img class=" wp-image-3631 alignnone" src="http://www.perftesting.co.uk/wp-content/uploads/2013/03/Untitled2-300x118.png" alt="" width="300" height="118" /></a></p>
<p>In the above image the following &lt;hashTree&gt; tags are created:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;hashTree&gt; &lt;!-- indent the next node --&gt;
&lt;!-- Test Plan node --&gt;
    &lt;hashTree&gt; &lt;!-- indent the next node --&gt;
    &lt;!-- Thread Group node --&gt;
        &lt;hashTree&gt; &lt;!-- indent the next node --&gt;
        &lt;!-- HTTP Sampler node --&gt;
        &lt;hashTree/&gt; &lt;!-- end HTTP Sampler node but no de-dent --&gt;
        &lt;!-- HTTP Sampler node --&gt;
        &lt;hashTree/&gt; &lt;!-- end HTTP Sampler node but no de-dent --&gt;
        &lt;!-- HTTP Sampler node --&gt;
        &lt;hashTree/&gt; &lt;!-- end HTTP Sampler node but no de-dent --&gt;
        &lt;/hashTree&gt; &lt;!-- de-dent the next node – end of HTTP Samplers --&gt;
    &lt;/hashTree&gt; &lt;!-- de-dent the next node – end of Thread Group --&gt;
&lt;/hashTree&gt; &lt;!-- de-dent the next node – end of Test Plan --&gt;
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Fcreating-jmeter-test-plans-with-fiddler%2F2013%2F03%2F01%2F&amp;title=Creating%20JMeter%20Test%20Plans%20with%20Fiddler" id="wpa2a_2"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/creating-jmeter-test-plans-with-fiddler/2013/03/01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Performance Reliability</title>
		<link>http://www.perftesting.co.uk/performance-reliability/2013/02/19/</link>
		<comments>http://www.perftesting.co.uk/performance-reliability/2013/02/19/#comments</comments>
		<pubDate>Tue, 19 Feb 2013 19:22:26 +0000</pubDate>
		<dc:creator>Jason Buksh</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Performance Testing Expert]]></category>
		<category><![CDATA[Performance Testing Process]]></category>
		<category><![CDATA[Performant]]></category>
		<category><![CDATA[reliable]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=3585</guid>
		<description><![CDATA[I’m a big fan of performance reliability, and it isn’t the expensive &#38; ‘cheap thinking’ type that is failover and resilience.  I’m talking about ‘functional performance resilience’ – the one where your system doesn’t blow up because someone somewhere has entered something silly or there has been a series of system defects that causes the system to slow or crash under load.  When I look for ways to make a system more performant (see my definition of performant here), one of the ways I look to increase reliability is to identify items that are not entirely obvious and have a low-risk threshold per item when looked at in isolation. Removing Performance Reliability Risks – Don’t Ignore the FLAGS!!! The risks I’m particularly seeking to address are unhandled exceptions, errors, messages telling you something you didn’t expect and warnings – I’m going to call these Flags.  I’ve been on a number of sites where system logs (including DB) are not monitored in live.  How a system behaves in live will ALWAYS be different from test.  If these Flags are not monitored, then this increases reliability risk over time.  Each of these Flags becomes a potential single point of failure (SPOF) for performance.  These [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.perftesting.co.uk/wp-content/uploads/2013/02/Screen-Shot-2013-02-19-at-19.08.10.png"><img class="alignright size-thumbnail wp-image-3586" title="Reliability under Load " src="http://www.perftesting.co.uk/wp-content/uploads/2013/02/Screen-Shot-2013-02-19-at-19.08.10-150x150.png" alt="" width="150" height="150" /></a></p>
<p style="text-align: justify;">I’m a big fan of performance reliability, and it isn’t the expensive &amp; ‘cheap thinking’ type that is failover and resilience.  I’m talking about ‘functional performance resilience’ – the one where your system doesn’t blow up because someone somewhere has entered something silly or there has been a series of system defects that causes the system to slow or crash under load.  When I look for ways to make a system more performant (see my <a title="Creating a Performant System" href="http://www.perftesting.co.uk/creating-a-performant-system/2013/02/17/">definition of performant</a> here), one of the ways I look to increase reliability is to identify items that are not entirely obvious and have a low-risk threshold per item when looked at in isolation.</p>
<p style="text-align: justify;"><strong>Removing Performance Reliability Risks – Don’t Ignore the FLAGS!!!</strong></p>
<p style="text-align: justify;">The risks I’m particularly seeking to address are unhandled exceptions, errors, messages telling you something you didn’t expect and warnings – I’m going to call these <strong>Flags</strong>.  I’ve been on a number of sites where system logs (including DB) are <strong>not</strong> monitored in live.  How a system behaves in live will ALWAYS be different from test.  If these Flags are not monitored, then this increases reliability risk over time.  Each of these Flags becomes a potential single point of failure (SPOF) for performance.  These Flags are very different from functional issues – as functional issues get noticed and prioritised.  Flags tend not to, they are invisible and don’t affect ‘the business’ in an obvious way, so get brushed under the carpet.</p>
<p style="text-align: justify;"><strong>Wood Lice and Your House</strong></p>
<p style="text-align: justify;">A single woodlice is not a problem in your house, but if you see one you step on it and remove.  If left unchecked you become infested, the many small problems will become a much larger issue – I think of  Flags in a similar way.</p>
<p style="text-align: justify;"><strong>An Avalanche of Flags</strong></p>
<p style="text-align: justify;">No monitoring of flags encourages an undisciplined approach, new releases will add to the number of Flags and before anyone realises there are a high number of Flags on system … and then its too late.  Simply looking at something and accepting it as a ‘valid error’ is common. In my book – the whole point of Flags are they are there <strong>not</strong> to be ignored &#8211; the system is behaving in a way that wasn&#8217;t expected.</p>
<p style="text-align: justify;"><strong>Wood From Trees</strong></p>
<p style="text-align: justify;">This is best illustrated when something bad happens on the live environment – people take a look at the logs, realize there are so many false Flags that they can’t easily piece together the crime scene.  Its littered with other debris.  A hard job has suddenly become a lot harder.  I’ve seen companies just ‘hope’ that that thing doesn’t just happen again (it failed over) because it too time consuming to the bottom of it.  This is a bad experience for end users and its also the result of poor Flag management.     This can result in expensive &amp; avoidable solutions such as Splunk.</p>
<p style="text-align: justify;"><strong>Causes of poor Flag Management:</strong></p>
<p style="text-align: justify;">Here are what I think are the underlying causes:</p>
<p style="text-align: justify;"><strong>Distorted Low Risk: </strong>We have a tendency to trivialize the small risks we feel we can control (e.g. Flags or functional issues) and exaggerate the large ones we feel we cannot (large influx of traffic, hardware failure).  But over time, these low risks can easily add up to a much larger risk than the infrequent.   This is perhaps the underlying cause people are most guilty of.  Over time a flag or set of flags becoming a Single Point Of Failure is inevitable.</p>
<p style="text-align: justify;"><strong>Usability</strong>: Visibility &amp; usability.  If all the flags are consolidated into a single place, easily accessible and easy to drill into – then people become much more proactive about them.  If they are hidden, dissipate and take time to access then who on earth is going to poke about in them unless there is an issue? … and by the time there is an issue its usually too late…..  Particularly relevant if a system has a high number of servers.</p>
<p style="text-align: justify;"><strong>Technical Management</strong>: Of lack of.  Communicating this risk and ensuring adequate processes and tools are in place is down to a lack of technical oversight (or Technical PM).  I view this as essential infrastructure &amp; plumbing that should be in place – If I commission a house, I expect the guttering, drainage and basic infrastructure to be built in. Not stated after the fact.</p>
<p style="text-align: justify;"><strong>Risk Management</strong></p>
<p style="text-align: justify;">So an effective “Performance Reliability” strategy is one that is a disciplined and a steady slog approach. Monitoring Flags on a daily basis, investigating and introducing fixes.  Its also a virtuous approach – the system behavior is better understood and reliability and overall health of the system is increased leading to less down time, more efficient use of dev time and results in less time on unnecessary remedial solutions.  Reliability is an intrinsic part of a <a title="Creating a Performant System" href="http://www.perftesting.co.uk/creating-a-performant-system/2013/02/17/">Performant system</a>. Keep the woodlice at bay.   Consolidate your logs, monitor and keep your house clean.</p>
<p style="text-align: justify;">Jason</p>
<p><a title="Anti Performant Patterns" href="http://www.perftesting.co.uk/anti-performant-patterns/2013/01/11/">Performant Anti-Patterns </a></p>
<p><a title="Monitoring Cache Performance" href="http://www.perftesting.co.uk/monitoring-cache-performance/2013/02/05/">Monitoring Cache Performance </a></p>
<p><a title="Creating a Performant System" href="http://www.perftesting.co.uk/creating-a-performant-system/2013/02/17/">Creating a Performant System</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Fperformance-reliability%2F2013%2F02%2F19%2F&amp;title=Performance%20Reliability" id="wpa2a_4"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/performance-reliability/2013/02/19/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Performant System</title>
		<link>http://www.perftesting.co.uk/creating-a-performant-system/2013/02/17/</link>
		<comments>http://www.perftesting.co.uk/creating-a-performant-system/2013/02/17/#comments</comments>
		<pubDate>Sun, 17 Feb 2013 20:11:25 +0000</pubDate>
		<dc:creator>Jason Buksh</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Performance Testing Expert]]></category>
		<category><![CDATA[Performance Testing Process]]></category>
		<category><![CDATA[Performant]]></category>
		<category><![CDATA[Performant IT systems]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=3563</guid>
		<description><![CDATA[“Hmmm, how can I make a system more Performant….?” .  I was tasked recently with making a fairly large system “More Performant” and I thought – what is a Performant system?  I’ve come across the term a fair bit recently and everyone has a slightly different view of what Performant is.   If everyone has a different perspective and I can’t measure then how can I quantify a system being performant  ….. It bothered me. Here are some definitions I found:  “Meeting system needs adequately”,  &#8221;Scales well and is efficient&#8221;,   “Performs well under load” …  most seemed loose, subjective and open to interpretation, particularly when different stakeholders have different objectives.  The underbelly of most definitions seems to be “Make it quicker, we are concerned it’s going to hack off our customers”. Defining a Performant Score: How can I decide that a system is more Performant than another and objectively compare to another system that may be completely different?  How do we factor in the reliability of a system?  In short, how can I define and measure if a system is Performant? Here’s a first stab&#8230; For me it’s more than the conventional definition of speed, A Performant system boils down to this: [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><span style="font-size: 13px; line-height: 19px;"><a href="http://www.perftesting.co.uk/wp-content/uploads/2011/09/Screen-Shot-2011-09-22-at-10.10.45.png"><img class="alignright size-full wp-image-1099" title="Custom Graphs" src="http://www.perftesting.co.uk/wp-content/uploads/2011/09/Screen-Shot-2011-09-22-at-10.10.45.png" alt="" width="253" height="198" /></a>“Hmmm, how can I make a system <em>more Performant</em>….?” .  I was tasked recently with making a fairly large system “More Performant” and I thought – </span><strong style="font-size: 13px; line-height: 19px;">what is a Performant system</strong><span style="font-size: 13px; line-height: 19px;">?  I’ve come across the term a fair bit recently and everyone has a slightly different view of what Performant is.   If everyone has a different perspective and I can’t measure then how can I quantify a system being performant  ….. It bothered me.</span></p>
<p style="text-align: justify;">Here are some definitions I found:  “Meeting system needs adequately”,  &#8221;Scales well and is efficient&#8221;,   “Performs well under load” …  most seemed loose, subjective and open to interpretation, particularly when different stakeholders have different objectives.  The underbelly of most definitions seems to be “Make it quicker, we are concerned it’s going to hack off our customers”.</p>
<p style="text-align: justify;"><strong>Defining a Performant Score:</strong></p>
<p style="text-align: justify;">How can I decide that a system is more Performant than another and objectively compare to another system that may be completely different?  How do we factor in the reliability of a system?  In short, how can I define and measure if a system is Performant? Here’s a first stab&#8230;</p>
<p>For me it’s more than the conventional definition of speed, A Performant system boils down to this:</p>
<h3 align="center">Performant Value = <em>function</em>: (Responsiveness x Reliability x Usability)</h3>
<p>A perfectly Performant system will score 1, which is impossible as there is always an element that can be improved.</p>
<p><strong>Responsiveness</strong> = <em>function</em>: (User Speed x User Speed under Load x … other load related activities)  (<strong>Max Score 1</strong>)</p>
<p><strong>Reliability</strong> = <em>function</em>: (Functional Defects x Uptime x resilience x failover ability x …..  ) (<strong>Max Score 1</strong>)</p>
<p><strong>Usability</strong> = <em>function</em>: (Ability of User to complete a desired task in the shortest amount of time x Any other relevant factors)  (<strong>Max Score 1</strong>)</p>
<p><strong>Note</strong>: Attribute’s are scored on a scale of 0 -&gt; 1. A value of 1 means an attribute is impossible to improve.</p>
<p>Each of the main attributes will consist of different weightings and variables for different type of systems e.g. Weight &amp; battery life may be added as attributes for Usability for hardware devices such as tablets.</p>
<p>The only software system that I can think of that may approach a Performant Score of 1 are Aircraft Control systems.</p>
<p>Here is my take on the three main attributes:</p>
<p>A system that scores highly only in <strong>Responsiveness</strong> will result in high user engagement.</p>
<p>A system that scores highly in both <strong>Responsiveness</strong> &amp; <strong>Reliability</strong> will endear loyalty.</p>
<p>A system that scores highly in <strong>Responsiveness</strong> &amp; <strong>Reliability</strong> &amp; <strong>Usability</strong> with result in Commitment &amp; Respect aka LOVE (yes I said that).</p>
<p style="text-align: justify;">Here’s a thought: When MS Vista was released, it was considered ‘Performant’ by some -  Imagine if they used the above formula to measure?  I’m sure there is a high chance it would have been less performant than XP.   This to me perfectly captures why a more rigid definition is important. It creates a common language and communicates in a clear and measurable way.</p>
<p style="text-align: justify;">The above definition of Performant looks pretty powerful, it can now be an objective measure of how we would emotionally impact an end user.  e.g. Are Apple devices more performant than MS devices?</p>
<p style="text-align: justify;">Does this definition make sense? Lets look at this in reverse “My system is not performant” generally means the system is beginning to hack people off.  So I think I’m in the right area.   We can also use the Performant score to measure the competitions weaknesses and concentrate on making a product better in those areas.</p>
<p style="text-align: justify;">So back to reality, when a client asks me to make a system more performant – I don’t just think about increasing speed, scalability and capacity pinch points.  I also look at reliability.  This is often overlooked – and I can have difficulty making a customer view reliability as a cost worth paying to make a system more performant. (Link here about <a title="Performance Reliability" href="http://www.perftesting.co.uk/performance-reliability/2013/02/19/"> Reliability and Performant</a>).  The problem with reliability is sometimes it just isn’t visible enough until its becomes a peformaant issue.</p>
<p style="text-align: justify;">Usability is something I rarely get directly involved in (But would like to) – this is one of the most overlooked aspects of systems, I’ve witnessed many great technologies fail/lose to inferior ones because of usability aspects.  A problem solved is not effective if it isn’t easily accessible to a the target user.</p>
<p style="text-align: justify;"><strong>Making A System More Performant</strong></p>
<p>So that’s my first stab at a most robust definition of a “Performant System”.   With the above definition a Performant system can now:</p>
<ol>
<li><span style="font-size: 13px; line-height: 19px;"><span style="background-color: #ffffff;">Objectively be measured</span></span></li>
<li><span style="font-size: 13px; line-height: 19px;">Compared to rivals in a less subjective way</span></li>
<li><span style="font-size: 13px; line-height: 19px;">Be used as a generic measure to compare different systems</span></li>
<li><span style="font-size: 13px; line-height: 19px;">Can be a measure of user stickiness or commitment</span></li>
<li><span style="font-size: 13px; line-height: 19px;">Produce comparisons against competitors and provide weaknesses </span></li>
</ol>
<p>&#8230;and with a stronger definition of Performant I can now meaningfully answer the question “How can I make a system more Perfomant?”</p>
<p>Jason</p>
<p>You may also like:</p>
<p><a title="Anti Performant Patterns" href="http://www.perftesting.co.uk/anti-performant-patterns/2013/01/11/">Performant Anti-Patterns </a></p>
<p><a title="Monitoring Cache Performance" href="http://www.perftesting.co.uk/monitoring-cache-performance/2013/02/05/">Monitoring Cache Performance </a></p>
<p><a title="Performance Testing is hitting the wall" href="http://www.perftesting.co.uk/performance-testing-is-hitting-the-wall/2012/04/11/">Performance Testing is Hitting the Wall </a></p>
<p><a title="Performance By Design – an Agile Approach" href="http://www.perftesting.co.uk/performance-by-design-an-agile-approach/2011/11/18/">Performance By Design – an Agile Approach </a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Fcreating-a-performant-system%2F2013%2F02%2F17%2F&amp;title=Creating%20a%20Performant%20System" id="wpa2a_6"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/creating-a-performant-system/2013/02/17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring Cache Performance</title>
		<link>http://www.perftesting.co.uk/monitoring-cache-performance/2013/02/05/</link>
		<comments>http://www.perftesting.co.uk/monitoring-cache-performance/2013/02/05/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 16:58:53 +0000</pubDate>
		<dc:creator>Jason Buksh</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[caching performance]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=3531</guid>
		<description><![CDATA[Cache Performance Caches are all about performance.  Performance Engineers need to have an appreciation of caches to be effective – they are used everywhere and directly have an impact on smooth running of an application.  This is one area where a live system can quickly fall over because time hasn&#8217;t been taken to understand the behaviour of caches during load testing. I’ve been using Memcache with WordPress, its so simple it’s beautiful.  I quickly starting caching frequency requested pages that requested expensive SQL.  Its so simple its scary and I was tempted to find different ways I could use it as ‘an easy way out’ … (and therein the path to abuse lies).  WordPress is a little different in its approach – it caches to disk, not to memory.  Which actually isn’t a bad thing – not everything needs to be cached to memory, expensive op’s are OK to cache to disk, and disk is cheaper than memory.    Anyway, I drift ….  Here’s a list of things to consider with real world caching: Load Testing Vs Real World testing:  If the test data you use for load testing is less than the cache size, but the real world data is [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Cache Performance</strong></p>
<p style="text-align: justify;">Caches are all about performance.  Performance Engineers need to have an appreciation of caches to be effective – they are used everywhere and directly have an impact on smooth running of an application.  This is one area where a live system can quickly fall over because time hasn&#8217;t been taken to understand the behaviour of caches during load testing.</p>
<p style="text-align: justify;">I’ve been using Memcache with WordPress, its so simple it’s beautiful.  I quickly starting caching frequency requested pages that requested expensive SQL.  Its so simple its scary and I was tempted to find different ways I could use it as ‘an easy way out’ … (and therein the path to abuse lies).  WordPress is a little different in its approach – it caches to disk, not to memory.  Which actually isn’t a bad thing – not everything needs to be cached to memory, expensive op’s are OK to cache to disk, and disk is cheaper than memory.    Anyway, I drift ….<span style="font-size: 13px; line-height: 19px;"> </span></p>
<p style="text-align: justify;">Here’s a list of things to consider with real world caching:</p>
<p style="text-align: justify;"><strong>Load Testing Vs Real World testing</strong>:  If the test data you use for load testing is less than the cache size, but the real world data is greater than cache size  you are always going to get faster results &#8211; because the system will never see thrashing/cache expires and dramatically lower DB activity.  Sometimes you just can&#8217;t model the breath of data a live system has against a load model &#8211; that OK, just assess this risk and document.</p>
<p style="text-align: justify;"><strong>Cache Lemming Visibility</strong>:  Caches are live but not monitored!? You are blind and are going the way of the lemming.  How big is the cache size?  How many elements does it have? How many cache hits/misses have you got?  What are the sizes of each of the elements – are any too big? Eviction policy and rate …  If you aren’t monitoring, trending and keeping tabs its all going to go horribly wrong.</p>
<p style="text-align: justify;">Here are some essential stats:<span style="font-size: 13px; line-height: 19px;"> </span></p>
<p style="text-align: justify;">
<table id="wp-table-reloaded-id-3-no-1" class="wp-table-reloaded wp-table-reloaded-id-3">
<tbody>
	<tr class="row-1 odd">
		<td class="column-1">Percent Used:</td><td class="column-2">=(Objects)/(Size)</td>
	</tr>
	<tr class="row-2 even">
		<td class="column-1">Effectiveness</td><td class="column-2">=(Hits)/(Hits + Misses)</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">Objects / Size:</td><td class="column-2">The number of entries in the cache / the number of total possible entries allowed (configurable).</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">Hit / Miss / Expiry (Counts):</td><td class="column-2">Reads accessing cache where required content was found / Reads accessing cache where required content was not found / Objects evicted from the cache.</td>
	</tr>
	<tr class="row-5 odd">
		<td class="column-1"></td><td class="column-2"></td>
	</tr>
</tbody>
</table>
</p>
<p style="text-align: justify;"><span style="font-size: 13px; line-height: 19px;">Always work out the total size of the cache – not all elements belonging to a cache are necessarily the same size.</span></p>
<p style="text-align: justify;"><strong>Transient Visibility</strong>: The nature of the above stats will change over a busy and non-busy period.  So I take these states every X mins intervals and analyze in Excel.   It lets me know the behavior and also allows me to work out if cache sizes are going to need resizing (essential if you are up to your limit in memory).  Busy periods are generally the most useful (but not necessarily).</p>
<p style="text-align: justify;"><strong>Session Caching</strong>:  Are caches heavy on user sessions.  This makes a difference if load-testing and you are attempting to cheat by upping the transaction rate (See <a title="Concurrency of Users Vs Increasing Transaction Rate" href="http://www.perftesting.co.uk/concurrency-of-users-vs-increasing-transaction-rate/2012/03/11/">Cheating &#8211; User or high transaction rates</a>).  Everyone cheats (or should) &#8211; but when you do, know the risks.</p>
<p style="text-align: justify;"><strong>Large Cache Objects: </strong>If the cache holds objects that are large in size be suspicious – is a small attribute of that object required, or is it needed in its entirety? Consider the processing/serialization overhead.  If we don’t cache hit big objects often, why cache?- This will have an impact on memory consumption and create excessive GC.  Don’t be afraid to ask questions.  Not everything is best in cache e.g. Large SQL result-sets. .</p>
<p style="text-align: justify;"><strong>Evidence based Cache profiling</strong>: A good Software Engineer will evidence where the application is spending the majority of its time, particularly on the DB.   If these are frequent then they should be good candidates for cache.</p>
<p style="text-align: justify;"><strong>Sharing: </strong>Does the Cache scale and share memory across servers? (Memcache can)<strong>.  </strong>Do you have a dedicated cache server? A lot of implementations do not – which means there is a risk of cache duplication across servers.   <span style="font-size: 13px; line-height: 19px;"> </span></p>
<p style="text-align: justify;"><strong>Cache Stampede</strong>: Under very high loads of concurrency caches can conspire to empty at the same time &#8211; causing a stampede effect on the DB and killing the system.</p>
<p style="text-align: justify;"><strong>Phase Synchronization</strong>:   Highly concurrency and high usage systems have a tendency to stop being unordered and &#8216;phase shift&#8217; into a pattern of behaviour &#8211; a pattern of order comes from relative chaos.  This can cause Cache stampedes and is a difficult one to identify.   A good analogy to describe this is the Millenium Bridge - people started walking in synchronisation, causing it to wobble.   Adding noise (aka Jitter) will help eliminate this.  This type of behaviour is only typical in large scale systems.  (ps I made this title up &#8211; as I couldn&#8217;t find a definition)</p>
<p style="text-align: justify;"><strong>Papering the Cracks</strong></p>
<p style="text-align: justify;">I have mixed feelings about caches – Its an inevitable and required strategy, however I’ve often seen them misused by software engineers.  Its too easy to take a good idea a little too far &#8211; and then begin to lose site of the fundamental architectural problem.  “Lets put everything in cache…. It’ll make everything faster”  ….  Its almost as if the DB and tuning is then forgotten (See <a title="Problems With an encapsulated approach" href="http://www.perftesting.co.uk/problems-with-an-encapsulated-approach/2013/01/10/">Costs of Encapsulation</a>).  Whats more I’ve seen SE’s then get their knickers in a twist attempting to solve locking and contention issues (you know everything a DB does really really well) through excessive use of a cache.  So my general observation about caches is that operations that require non time critical reads (i.e. data that isn’t likely to change soon) are generally good candidates. Highly volatile time critical data isn’t.</p>
<p style="text-align: justify;"><strong>Throwing the golden goose over the fence and then </strong><strong>forgetting</strong></p>
<p style="text-align: justify;">The golden rule for effective cache performance is to monitor, analyse and actively measure, measure measure. No visibility means you are blind and likely to find trouble</p>
<p style="text-align: justify;">Jason</p>
<p style="text-align: justify;">You might also be interested in:</p>
<p style="text-align: justify;"><a title="Being Proactive about Performance" href="http://www.perftesting.co.uk/being-proactive-about-performance/2011/09/08/">Being Proactive about Performance </a></p>
<p style="text-align: justify;"><a title="Anti Performant Patterns" href="http://www.perftesting.co.uk/anti-performant-patterns/2013/01/11/">Anti-Performant Patterns </a></p>
<p style="text-align: justify;"><a title="Performance Benchmark Testing – Part 1" href="http://www.perftesting.co.uk/performance-benchmark-testing-part-1/2012/02/05/">Performance Benchmarking Part1</a></p>
<p style="text-align: justify;"><a title="Managing, identifying &amp; assessing Performance Requirements" href="http://www.perftesting.co.uk/managing-identifying-assessing-performance-requirements/2011/09/13/">Managing Identifying &amp; Assessing Performance Requirements</a></p>
<p style="text-align: justify;">
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Fmonitoring-cache-performance%2F2013%2F02%2F05%2F&amp;title=Monitoring%20Cache%20Performance" id="wpa2a_8"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/monitoring-cache-performance/2013/02/05/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Appetite to Eat Efficiency</title>
		<link>http://www.perftesting.co.uk/the-appetite-to-eat-efficiency/2013/01/12/</link>
		<comments>http://www.perftesting.co.uk/the-appetite-to-eat-efficiency/2013/01/12/#comments</comments>
		<pubDate>Sat, 12 Jan 2013 13:20:16 +0000</pubDate>
		<dc:creator>Jason Buksh</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[Random Thoughts and Musing]]></category>
		<category><![CDATA[capacity]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=3417</guid>
		<description><![CDATA[&#8220;Any gain in bandwidth capacity through efficiency techniques will be short lived. Increases in functionality, bad practice or abstracted inefficiency will absorb that initial saving quickly &#8221; &#8211; me  I was flicking through the IKEA catalogue the advert (see diagram) struck a cord with me. An  LED bulb had been created which was 85% more energy efficient than a traditional bulb. However the designer and retailer have seen fit to put 16 of them into a single housing.  I calculated that they had created a fixture which would use 140% more energy than that of a single incadensant bulb.  As we innovate and create a more efficient ways, the market appears to unconsciously find a way of utilising the spare capacity given. I see many parallels within the IT industry.  I&#8217;ve seen chipsets get faster and the supporting software get bloated (MS for instance) &#8211; negating the increased and intended benefits.  Within the web industry we see that as the average bandwidth capability increases, the average size of web-pages increase.  Every low level improvement (SPDY, Broadband, CDN&#8217;s) seems to be met by a general tendancy to gobble up the spare capacity given. It&#8217;s almost as if there is a unconscious and self-regulating mechanism at play. No matter how much we [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><em><a href="http://www.perftesting.co.uk/wp-content/uploads/2013/01/Performance-Irony.jpg"><img class="alignright size-medium wp-image-3501" title="Performance Irony" src="http://www.perftesting.co.uk/wp-content/uploads/2013/01/Performance-Irony-300x225.jpg" alt="" width="300" height="225" /></a>&#8220;Any gain in bandwidth capacity through efficiency techniques will be short lived. Increases in functionality, bad practice or abstracted inefficiency will absorb that initial saving quickly &#8221; &#8211; me </em></p>
<p style="text-align: justify;"><strong></strong>I was flicking through the IKEA catalogue the advert (see diagram) struck a cord with me. An  LED bulb had been created which was 85% more energy efficient than a traditional bulb. However the designer and retailer have seen fit to put 16 of them into a single housing.  I calculated that they had created a fixture which would use 140% more energy than that of a single incadensant bulb.  As we innovate and create a more efficient ways, the market appears to unconsciously find a way of utilising the spare capacity given.</p>
<p style="text-align: justify;">I see many parallels within the IT industry.  I&#8217;ve seen chipsets get faster and the supporting software get bloated (MS for instance) &#8211; negating the increased and intended benefits.  Within the web industry we see that as the average bandwidth capability increases, the average size of web-pages increase.  Every low level improvement (SPDY, Broadband, CDN&#8217;s) seems to be met by a general tendancy to gobble up the spare capacity given. It&#8217;s almost as if there is a unconscious and self-regulating mechanism at play.</p>
<p style="text-align: justify;">No matter how much we increase the available capacity the marketplace seems to find a way of utilising this, through bad practice or good.  I have a theory as to one reason why this may be the case and it&#8217;s one of the costs associated with <a title="Problems With an encapsulated approach" href="http://www.perftesting.co.uk/problems-with-an-encapsulated-approach/2013/01/10/">encapsulation and abstraction</a>.  The hardware, OS, software services, compiler, back, middle and presentation tier are essentially abstracted.  The people that implement (developers, web designers) are so specialised and siloed they have little regard or interest in these components until they realise the application is unacceptably slow; then improvements are made up until application performance becomes acceptable, thus filling all available capacity.</p>
<p style="text-align: justify;">I&#8217;m going to make an attempt at a general industry Rule:</p>
<h3 style="text-align: center;"><span style="color: #0000ff;"><strong>Buksh’s Web Capacity Rule:</strong></span></h3>
<p style="text-align: left;"><em><strong>Any gain in bandwidth capacity through efficiency techniques will be short lived, as increases in functionality, bad practice or abstracted inefficiency will absorb that initial saving quickly</strong></em></p>
<p>Also by implication, the rule is saying that the marketplave will average a page to reach the target audience within an acceptable industry response time  (2-3 seconds)</p>
<p><span style="color: #0000ff;"><strong>Average Page Size</strong> = ALT * Average Bandwidth Capacity </span></p>
<p><span style="color: #0000ff;">ALT</span> = Average Acceptable Load Time, lets say this is 3 secs.</p>
<p><span style="color: #0000ff;">ABT</span> = Average Bandwidth Capacity of target market.</p>
<p>This means we can probably work out the average bandwidth capacity of the world (western) by taking the average page size and dividing by 3 secs.</p>
<p>….looking around, the average page size is now 1024k (according to Strangeloop).  So:</p>
<p><strong><span style="color: #0000ff;">Average Bandwidth Capacity of consumers is 341k == </span></strong><span style="color: #0000ff;">0.3 of a MB ==2.5 Mbps  </span></p>
<p><strong>This means if a page is to load in 1 sec, it should be approx. 0.3 MB in size.</strong>  (Of course this is a very course calculation, but it should provide a good guide)</p>
<p style="text-align: justify;">This as a rule has some other implications.  It&#8217;s fairly safe to assume that the average bandwidth (to consumers) will continue to increase.  This means the industry is forever going to be in a continuous game of cat and mouse.  Pages will continue to gain in average size no matter what.  Client browsers will experience larger demands on their resources and continue to grow in complexity.</p>
<p style="text-align: justify;"><strong>Dancing is better than waddling</strong></p>
<p style="text-align: justify;">So back to the lights &#8211; I suspect if we ever reach a point where too much performance capacity is cheaply given, then as a whole we will have a tendency to over utilise &amp; become bloated.  Our nature and practice seems to dictate this.  Having performance and capacity restrictions ironically makes us leaner, meaner, inventive and more responsive.  I think if we get to a point where bandwidth capacity isn&#8217;t a restricting factor then this will have a tendency to make us lazy, fat and bloated with a host of unintentional and indirect consequences.  Thankfully those that are lean, dance a lot better than those that are not at present, I hope it remains that way.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Fthe-appetite-to-eat-efficiency%2F2013%2F01%2F12%2F&amp;title=The%20Appetite%20to%20Eat%20Efficiency" id="wpa2a_10"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/the-appetite-to-eat-efficiency/2013/01/12/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Anti Performant Patterns</title>
		<link>http://www.perftesting.co.uk/anti-performant-patterns/2013/01/11/</link>
		<comments>http://www.perftesting.co.uk/anti-performant-patterns/2013/01/11/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 11:23:57 +0000</pubDate>
		<dc:creator>Jason Buksh</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[Performance Testing Expert]]></category>
		<category><![CDATA[anti performance patterns]]></category>
		<category><![CDATA[anti performant patterns]]></category>
		<category><![CDATA[performance by design]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=3452</guid>
		<description><![CDATA[As a consultant I’ve had the privilege of working on many sites, experienced different technologies, implementations and customer approaches.  Although my experience is not definitive, I’m going to identify some of the reoccurring themes that are common and appear to accumulate in an enterprise system displaying poor performance characteristics. Note: I’ve deliberately steered away from the delivery mechanisms that deal with the effects of latency (such as CDN’s and best practices for browser rendering), they have been covered elsewhere and are well understood. This piece will deal with the ‘inside the firewall’ anti-performant patterns. Each of the below items should be considered summaries, they can easily be expanded into more expansive articles, but for readability they have been kept succinct: Organic Inheritance and loss of control:  Applications are built over years, people and knowledge move on.  Code isn’t “in-line” documented, understood or owned. Temporary fixes become permanent.  No concerted effort is made to understand, refactor or reengineer old code as this ‘just works’; only the truth of the matter is no-one has the time to understand what ‘that bit does’ and they have become scared of changing it because it does something that no-one quite understands and is used by a [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://www.perftesting.co.uk/wp-content/uploads/2013/01/Screen-Shot-2013-01-11-at-10.48.07.png"><img class="alignright size-medium wp-image-3456" title="Performance Anti-Pattern" src="http://www.perftesting.co.uk/wp-content/uploads/2013/01/Screen-Shot-2013-01-11-at-10.48.07-212x300.png" alt="" width="212" height="300" /></a>As a consultant I’ve had the privilege of working on many sites, experienced different technologies, implementations and customer approaches.  Although my experience is not definitive, I’m going to identify some of the reoccurring themes that are common and appear to accumulate in an enterprise system displaying poor performance characteristics.</p>
<p style="text-align: justify;"><strong>Note</strong>: I’ve deliberately steered away from the delivery mechanisms that deal with the effects of latency (such as CDN’s and best practices for browser rendering), they have been <a title="Performance by design" href="http://www.perftesting.co.uk/performance-by-design-ii/2011/11/27/" target="_blank">covered elsewhere</a> and are well understood. This piece will deal with the ‘inside the firewall’ anti-performant patterns.</p>
<p style="text-align: justify;">Each of the below items should be considered summaries, they can easily be expanded into more expansive articles, but for readability they have been kept succinct:</p>
<p style="text-align: justify;"><span style="color: #0000ff;"><strong>Organic Inheritance and loss of control</strong></span>:  Applications are built over years, people and knowledge move on.  Code isn’t “in-line” documented, understood or owned. Temporary fixes become permanent.  No concerted effort is made to understand, refactor or reengineer old code as this ‘just works’; only the truth of the matter is no-one has the time to understand what ‘that bit does’ and they have become scared of changing it because it does something that no-one quite understands and is used by a lot of other code.</p>
<p style="text-align: justify;"><strong><span style="color: #000000;">Prevention</span>: </strong>Constant refactoring of existing code, peer reviews and strict in-line documentation and coding standards.  If there is code that isn’t understood this should be made a priority.</p>
<p style="text-align: justify;"><span style="color: #0000ff;"><strong>‘Over the fence’ to Production</strong></span>:  The system resides on hardware that is managed by an external vendor.  In some extreme cases I’ve seen clients think that once it’s live it’ll just work.  When it&#8217;s ‘thrown over fence’, they fail to see the need for continuous monitoring of both hardware, software, error messages and end user response times.</p>
<p style="text-align: justify;"><strong><span style="color: #000000;">Prevention</span>:</strong> Consolidated logging consoles e.g. Splunk, loglogic, graylog2  (Splunk is overpriced ) - particularly if there are a high number of web &amp; application servers.  Active monitoring of log messages and removal of spurious error logs.  Monitoring and reporting of hardware performance counters such as CPU, I/O and heap allocation.  Instrumentation of key business flows – into CSV’s and graphed, this will vastly reduce the need for expensive APM’s or tools such as Gomez.  (See <a title="Performance Reliability" href="http://www.perftesting.co.uk/performance-reliability/2013/02/19/">Creating Performance Reliability</a>)</p>
<p style="text-align: justify;"><span style="color: #0000ff;"><strong>No dedicated DB expertise</strong></span>:  DB’s are complex, I think of them as operating systems in their own right. I’ve been surprised by how many DB’s have been constructed by developers – sometimes many developers contribute to a DB.  But without a holistic source of control and expertise the DB will become unmanageable and a source of application contention.</p>
<p style="text-align: justify;"><span style="color: #000000;"><strong>Prevention</strong></span>:   Employ a DB developer (not a DBA).. all tables changes, PL/SQL and SQL should at least be QA’ed by this role before being allowed live onto the system.  A good DB developer will constantly measure the live system performance and tune, tune, tune.</p>
<p style="text-align: justify;"><span style="color: #0000ff;"><strong>No Live Measures for Continuous Improvement (CI): </strong></span>The performance characteristics of a system are constantly subject to change (such as load) and variables that are in a constant state of flux (such as user profiles).  How the system behaves in test will be extremely different to live.   If you don’t measure, monitor and feedback constantly from the live environment you are going the way of the Lemming.</p>
<p style="text-align: justify;"><span style="color: #000000;"><strong>Prevention</strong></span>: Measure! If you don’t measure how can you improve? The quality and depth of your measurements are directly related to CI improvements you can feedback.</p>
<p style="text-align: justify;"><strong style="color: #0000ff;"><strong>The Encapsulation Jigsaw</strong>:  </strong><span style="color: #000000;">Many different services are pieced together with little oversight or communication.  A loss of respect for CPU cycles and understanding of internal system behaviour within these services becomes the normal.  More detail can be <a title="Unforeseen Costs of an encapsulated approach" href="http://www.perftesting.co.uk/problems-with-an-encapsulated-approach/2013/01/10/" target="_blank"><span style="color: #000000;">found here</span></a>.</span></p>
<p style="text-align: justify;"><strong style="color: #0000ff;">Unmeasured Cache </strong><span style="color: #0000ff;"><strong>Behaviour</strong>:</span> The system utilizes a number of caches for commonly requested objects, only no-one has any data on how these caches are actually used in the real world.  The cache contains a 1000 objects – but no-one knows the size of each of these objects, how long they live for, how many times they are requested, how many times they are thrashed.  Is the cache too big or too small? Is the TTL too high or too small?  This all creates memory overhead and inefficient use of resources such as DB’s. (See <a title="Monitoring Cache Performance" href="http://www.perftesting.co.uk/monitoring-cache-performance/2013/02/05/">Measuring Cache Performance</a>)</p>
<p style="text-align: justify;"><span style="color: #000000;"><strong>Prevention</strong></span>: Measure and report on the caches everyday. Understand their behavior, refine and keep in check.  Caches are a good idea that become a drag if left unchecked.</p>
<p style="text-align: justify;"><span style="color: #0000ff;"><strong>Unrealistic Performance Expectations:  </strong></span>Not strictly an anti-pattern but a pattern I see that becomes a significant drag to projects.  A new system (or part) is due to go live<strong>,</strong> the business expects use that is going to turn out to be wildly above expectations – resulting in a system that is over engineered, resourced &amp; over budget.  By default the business is going to be over optimistic and think this is the best thing since sliced bread.</p>
<p style="text-align: justify;"><strong><span style="color: #000000;">Prevention</span>:  </strong>Use current usage statistics, derive a usage profile that is derived from a mathematical formula that can be scrutinized and subject to rigor by all parties.  If variables aren’t known then guess and state.  Make sure this derived figure is reviewed through walk-throughs and classroom inspections. I’ve been in many places where figures are stated and not inspected until too late.  Months of effort can be wiped off a project by simple review. <strong> </strong></p>
<p style="text-align: justify;"><strong><span style="color: #0000ff;">Non technical PM’s</span>: </strong> Project managers that concentrate on managing up, not down – have no interest or appreciation of development practices.  Developers are then not given enough steer and are allowed to work in isolation without an awareness of the overall system.   This is the one that irks me the most &#8211; would you employ a football manager that has little understanding of how the pieces fit together and flow? Or just fills in the gaps and reports on progress (or lack of)?</p>
<p style="text-align: justify;"><strong><span style="color: #000000;">Prevention</span>:  </strong>Employ a PM that has good development experience.</p>
<p style="text-align: justify;">I’ve found each of the above are common patterns that accumulate into a system becoming none performant. More over, the above patterns make quickly identifying the root cause of poor performance almost impossible.  Putting simple measures and practices (such as <a title="Performance by design" href="http://www.perftesting.co.uk/performance-by-design-an-agile-approach/2011/11/18/">performance by design</a> approaches) in place during development and product lifecycle will mitigate performance and non performant risk.  I’ve seen many of the above implemented and they work extremely well.</p>
<p style="text-align: justify;">See Also:</p>
<p id="post-421"><a title="Permanent Link to Being Proactive about Performance" href="http://www.perftesting.co.uk/being-proactive-about-performance/2011/09/08/" rel="bookmark">Proactive Performance Prevention</a></p>
<p id="post-1812"><a title="Permanent Link to Performance By Design – an Agile Approach" href="http://www.perftesting.co.uk/performance-by-design-an-agile-approach/2011/11/18/" rel="bookmark">Performance By Design – an Agile Approach</a></p>
<p id="post-1666"><a title="Permanent Link to My Top Tips For Performance Testing" href="http://www.perftesting.co.uk/my-top-tips-for-performance-testing/2011/10/18/" rel="bookmark">My Top Tips For Performance Testing</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Fanti-performant-patterns%2F2013%2F01%2F11%2F&amp;title=Anti%20Performant%20Patterns" id="wpa2a_12"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/anti-performant-patterns/2013/01/11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problems With an encapsulated approach</title>
		<link>http://www.perftesting.co.uk/problems-with-an-encapsulated-approach/2013/01/10/</link>
		<comments>http://www.perftesting.co.uk/problems-with-an-encapsulated-approach/2013/01/10/#comments</comments>
		<pubDate>Thu, 10 Jan 2013 14:42:18 +0000</pubDate>
		<dc:creator>Jason Buksh</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[Performance Testing Expert]]></category>
		<category><![CDATA[Performance Testing Process]]></category>
		<category><![CDATA[performance by design]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=3432</guid>
		<description><![CDATA[Unforeseen Costs of an encapsulated approach:  We need to abstract, encapsulate and hide complexity in order to build complex behaviour   This is why we have OO, SOAP, web services and other SOA approaches.  But for all the benefits they give I see practical disadvantages emerging in the real world.  As we sew more encapsulated objects together there is an associated management cost, which quickly runs out of check when ignored or put aside for other priorities. I’ve termed the act of encapsulating, blackboxing or providing a service as an ‘Island’ (aka information island).  I&#8217;m not fond of the term but its seems apt. Islanding occurs in reality and frequently within enterprise environments. Different ‘information islands’ are joined together with the expectation they will fit like a neat little jigsaw – only they don’t.  Here are some of the reasons I see the pieces not joining neatly together as one would expect: Replication: Repeat checking, Performance Often there is duplication replication of functions within separate islands.  A simple example of this is transferring information between islands through XML, also functions may be repeated to wrap up information into a format that is easier to pass around. Passing information between Islands means the Islands aren’t quite sure if [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong><a href="http://www.perftesting.co.uk/wp-content/uploads/2013/01/Screen-Shot-2013-01-11-at-11.08.54.png"><img class="alignright size-medium wp-image-3470" title="Unforeseen costs" src="http://www.perftesting.co.uk/wp-content/uploads/2013/01/Screen-Shot-2013-01-11-at-11.08.54-145x300.png" alt="" width="145" height="300" /></a>Unforeseen Costs of an encapsulated approach:  </strong>We need to abstract, encapsulate and hide complexity in order to build complex behaviour   This is why we have OO, SOAP, web services and other SOA approaches.  But for all the benefits they give I see practical disadvantages emerging in the real world.  As we sew more encapsulated objects together there is an associated management cost, which quickly runs out of check when ignored or put aside for other priorities.</p>
<p style="text-align: justify;">I’ve termed the act of encapsulating, blackboxing or providing a service as an ‘<strong>Island</strong>’ (aka information island).  I&#8217;m not fond of the term but its seems apt. Islanding occurs in reality and frequently within enterprise environments. Different ‘information islands’ are joined together with the expectation they will fit like a neat little jigsaw – only they don’t.  Here are some of the reasons I see the pieces not joining neatly together as one would expect:</p>
<p style="text-align: justify;"><strong>Replication: </strong>Repeat checking, Performance</p>
<p style="text-align: justify;">Often there is duplication replication of functions within separate islands.  A simple example of this is transferring information between islands through XML, also functions may be repeated to wrap up information into a format that is easier to pass around. Passing information between Islands means the Islands aren’t quite sure if its been syntactically correct or validated.  This creates overhead, as multiple same checks for the passage of data through the system is performed.</p>
<p style="text-align: justify;"><strong>Demand: </strong>Disregard for execute time, Performance</p>
<p style="text-align: justify;">Example:  If I require an array of objects from an Island, should I ask for one at a time or all at once?  In most cases all at once, however in the real world this is down to the experience/skill of the requester.  I’ve seen plenty of cases where a service has been provided and the external user to the island has placed unnecessary high demands on the island.  When you black box its easy for the requesters to lose respect for efficiency, resulting in a higher than necessary overall execution time.</p>
<p style="text-align: justify;"><strong>Abstraction: </strong>Loose of Understanding, Maintenance</p>
<p style="text-align: justify;">I think some items can be abstracted too much.  Too much abstraction can mean its difficult to understand what should be a simple function (e.g Date formatting).  I’ve lost count of the times I’ve had to open 20+ screens to understand a very simple process or function.  Anything with a complexity function depth of 5+ inherently starts to introduce code risk. There is a little irony here we need to encapsulate to build complexity, but the more we encapsulate (or abstract) the harder it is to understand and there is an associated risk of defects being introduced.</p>
<p style="text-align: justify;"><strong>Deluge</strong>: Overhead, CPU cycles</p>
<p style="text-align: justify;">If a service requires a small piece of information, but an Island returns that information with an associated large amount of ancillary information (which is swiftly disregarded),  this is wasteful. I’ve seen this happen because internal teams simply haven’t communicated well. Services are built and then requests for small pieces of information result in a large XML being returned, much of which is redundant.   This places a large amount of demand on run-time memory, the Island’s DB and unnecessary processing of the XML.  Islands do not know exactly what is going to be required (or how frequency), so they overengineering of return data which then become redundant</p>
<p style="text-align: justify;"><strong>Policing</strong>:</p>
<p style="text-align: justify;">If you open your island up to the external world, there is code overhead – you have to actively police the requests coming in. Throttling, authentication and ensuring the business as usual system isn’t being affected.  If some form of policing and control isn&#8217;t put in place someone can misuse unintentionally.</p>
<p style="text-align: justify;"><strong>Loss of Control: </strong>Complexity: Execution</p>
<p style="text-align: justify;">If information is sent to an essential external Island but and no response is received what should happen? If I get a response back that is outside my SLA, how do I prove? Is it my service?, the other service? or something in-between? How do I replicate?   Relying on external services by third parties (such as Credit Card) introduces a whole raft of difficult issues should it not perform as expected.   Black box islands are fine when they work however they can be incredibly tricky to isolate as a source of issues if you have no control or visibility.</p>
<p style="text-align: justify;">There are other costs that are overlooked &#8230;  I’ll add as I think of more.</p>
<p style="text-align: justify;"><strong>Wasted CPU cycles are BAD. </strong></p>
<p style="text-align: justify;">Some of the above items result in wasted or duplication of CPU cycles, these quickly add up to a large performance overhead and an associated large financial cost, either in lost business, developer re-engineering time or associated hardware costs.</p>
<p style="text-align: justify;">With ‘islanding’ an unintentional loss of respect for CPU cycles naturally occurs, system behavior and architectural respect is naturally lost.  High demands and a loss of performance are symptomatic of this.  This gap is why APM solutions have grown and become such large businesses &#8211; customers need help managing the OO jigsaw.</p>
<p style="text-align: justify;">Many of the above instances can be prevented with oversight, having someone responsible for a system wide view (a performance by design role) – working across the project and communicating within all teams. However I’m seeing a tendency for teams to increasingly work in isolation – either because they have high demands on their time, they are geographically dispersed and the effort to communicate becomes difficult.</p>
<p style="text-align: justify;">
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Fproblems-with-an-encapsulated-approach%2F2013%2F01%2F10%2F&amp;title=Problems%20With%20an%20encapsulated%20approach" id="wpa2a_14"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/problems-with-an-encapsulated-approach/2013/01/10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using RegEx (Regular Expressions) in Jmeter – CoRelation in Jmeter</title>
		<link>http://www.perftesting.co.uk/corelation-in-jmeter-regular-expression-extractor/2012/08/11/</link>
		<comments>http://www.perftesting.co.uk/corelation-in-jmeter-regular-expression-extractor/2012/08/11/#comments</comments>
		<pubDate>Sat, 11 Aug 2012 11:09:22 +0000</pubDate>
		<dc:creator>swaraj gupta</dc:creator>
				<category><![CDATA[JMeter]]></category>
		<category><![CDATA[jmeter]]></category>
		<category><![CDATA[Swaraj_Gupta]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=3370</guid>
		<description><![CDATA[In this article I will describe how to use the Regular expression extractor in Jmeter for the dynamic data corelation needs of web requests. I will first discuss how to add a RegEx to a webrequest, the basics terminologies associated with RegEx and then describe how different types of regular expression requirements can be met. Lets look at this web request - As we can see that an id generates for BS_Type parameter of the request. This id changes in every replay and requires parameterization for effective script replay and business flow completion. To overcome the challenge, we add a regular expression extractor to extract the value of dynamic data during replay and use it in subsequent request. Regular exp extractor can be added by, Right Click on Webrequest -&#62; Click &#8216;Add&#8217; -&#62; Click &#8216;Post Processors&#8217; -&#62; Click &#8216;Regular Expression Extractor&#8217;. Some of the key elements of RegEx are - Reference Name – Name of the variable used for the dynamic id, here it is named as QATypeID. In subsequent requests in JMeter, we’ll reference this variable as ${QATypeId}. Regular Expression – This is the key statement and we will extract the data we’re looking for using this expression. Brackets are put around the value we want [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/08/RegularExpression.jpg"><img class="alignleft size-thumbnail wp-image-3425" src="http://www.perftesting.co.uk/wp-content/uploads/2012/08/RegularExpression-150x150.jpg" alt="" width="150" height="150" /></a>In this article I will describe how to use the Regular expression extractor in Jmeter for the dynamic data corelation needs of web requests. I will first discuss how to add a RegEx to a webrequest, the basics terminologies associated with RegEx and then describe how different types of regular expression requirements can be met.</p>
<p>Lets look at this web request -</p>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/08/WebRequest7.jpg"><img class="alignnone size-large wp-image-3404" src="http://www.perftesting.co.uk/wp-content/uploads/2012/08/WebRequest7-1024x483.jpg" alt="" width="580" height="273" /></a></p>
<p>As we can see that an id generates for BS_Type parameter of the request. This id changes in every replay and requires parameterization for effective script replay and business flow completion.</p>
<p>To overcome the challenge, we add a regular expression extractor to extract the value of dynamic data during replay and use it in subsequent request. Regular exp extractor can be added by, Right Click on Webrequest -&gt; Click &#8216;Add&#8217; -&gt; Click &#8216;Post Processors&#8217; -&gt; Click &#8216;Regular Expression Extractor&#8217;.</p>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/08/RegularExpressionExtractor2.jpg"><img class="alignnone size-large wp-image-3390" src="http://www.perftesting.co.uk/wp-content/uploads/2012/08/RegularExpressionExtractor2-1024x504.jpg" alt="" width="580" height="285" /></a></p>
<p>Some of the key elements of RegEx are -</p>
<ul>
<li>Reference Name – Name of the variable used for the dynamic id, here it is named as QATypeID. In subsequent requests in JMeter, we’ll reference this variable as ${QATypeId}.</li>
<li>Regular Expression – This is the key statement and we will extract the data we’re looking for using this expression. Brackets are put around the value we want to extract. So in our example we have <strong>qatype=&#8221;(.+?)&#8221;     var sr_f = &#8220;mn_newsmartsearch.php&#8221;; </strong>or, Here we are looking for the value that is located between  <strong>qatype=&#8221;</strong> and <strong>&#8220;    var sr_f = &#8220;mn_newsmartsearch.php&#8221;;</strong> The expression will search for the strings and identify the right string to parameterize based on values of following elements.</li>
<li>Template – Multiple occurance of LB and RB mentioned above is possible and thus multiple values could be extracted. In our case we have just one, and so we’re using the first template, or <strong>$1$.</strong></li>
<li>Match No. – In case of multiple matches, this element plays a key role. In our case, we want the first match, so we have mentioned &#8217;1&#8242;.</li>
<li>Default value – If no match for mentioned LB and RB combination is found, then one can parse a default value to the variable using this element. It can also be left blank.</li>
</ul>
<p>Reg Ex text extraction requirements can be different in different scenarios. At times only one value (out of many available) may be required and at times multiple values. The below pasted solutions can be used to meet to different types of text / string requirements.</p>
<ul>
<li>*? &#8211; Match 0 or more times</li>
<li>+? &#8211; Match 1 or more times</li>
<li>?? &#8211; Match 0 or 1 time</li>
<li>{n}? &#8211; Match exactly n times</li>
<li>{n,}? &#8211; Match at least n times</li>
<li>{n,m}? &#8211; Match at least n but not more than m times</li>
</ul>
<p>One can look at the below pasted perl script regex features that supported in Jmeter -</p>
<ul>
<li>(?#text) &#8211; An embedded comment that causes text to be ignored.</li>
<li>(?:regexp) &#8211; Groups things like &#8220;()&#8221; but doesn&#8217;t cause the group match to be saved.</li>
<li>(?=regexp) &#8211; A zero-width positive lookahead assertion. For example, \w+(?=\s) matches a word followed by whitespace, without including whitespace in the MatchResult.</li>
<li>(?!regexp) &#8211; A zero-width negative lookahead assertion. For example foo(?!bar) matches any occurrence of &#8220;foo&#8221; that isn&#8217;t followed by &#8220;bar&#8221;. Remember that this is a zero-width assertion, which means that a(?!b)d will match ad because a is followed by a character that is not b (the d) and a d follows the zero-width assertion.</li>
<li>(?imsx) &#8211; One or more embedded pattern-match modifier; &#8217;i&#8217; enables case insensitivity, &#8216;m&#8217; enables multiline treatment of the input, &#8216;s&#8217; enables single line treatment of the input, and &#8216;x&#8217; enables extended whitespace comments.</li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Fcorelation-in-jmeter-regular-expression-extractor%2F2012%2F08%2F11%2F&amp;title=Using%20RegEx%20%28Regular%20Expressions%29%20in%20Jmeter%20%26%238211%3B%20CoRelation%20in%20Jmeter" id="wpa2a_16"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/corelation-in-jmeter-regular-expression-extractor/2012/08/11/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Jmeter – A Glossary of Terms</title>
		<link>http://www.perftesting.co.uk/starting-with-jmeter-a-must-read-for-you/2012/07/11/</link>
		<comments>http://www.perftesting.co.uk/starting-with-jmeter-a-must-read-for-you/2012/07/11/#comments</comments>
		<pubDate>Wed, 11 Jul 2012 08:25:55 +0000</pubDate>
		<dc:creator>swaraj gupta</dc:creator>
				<category><![CDATA[JMeter]]></category>
		<category><![CDATA[jmeter]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=3219</guid>
		<description><![CDATA[Starting Jmeter can be difficult, as the terminology can take time to get to grips with.  What follows is a high level description of the key Jmeter Terms. My personal experience with Jmeter has been great.  Many performance test engineers face difficulty during their first attempts with the tool because of the terminology.Listeners, pre-processor elements, post processor elements can appear overly complicated. A list of such terms can be formed and many testers loose their enthusiasm and move to other tool before completing a POC on Jmeter. Test Plan &#8211; A test plan provides a framework on which different web requests and operations pertaining to a test can be added. The tool will execute these operations during run-time with multiple users (threads) as planned. Some of the important elements of a test plan are &#8211; Thread Group, Listeners, Logic controllers, assertions, etc. Samplers &#8211; Samplers are the components that are used to send requests to the server. The requests can be HTTP, FTP, SOAP, XML, JDBC and LDAP requests. For &#8216;Post requests&#8217;, post data can be found added in the parameter section of the samplers. Controllers - You can group your Samplers (Requests) in controller. Controller thus helps to set order [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/07/Things-you-should-know3.jpg"><img class="size-full wp-image-3285 alignleft" src="http://www.perftesting.co.uk/wp-content/uploads/2012/07/Things-you-should-know3.jpg" alt="" width="153" height="163" /></a>Starting Jmeter can be difficult, as the terminology can take time to get to grips with.  What follows is a high level description of the key Jmeter Terms.</p>
<p>My personal experience with Jmeter has been great.  Many performance test engineers face difficulty during their first attempts with the tool because of the terminology.Listeners, pre-processor elements, post processor elements can appear overly complicated. A list of such terms can be formed and many testers loose their enthusiasm and move to other tool before completing a POC on Jmeter.</p>
<p><strong>Test Plan</strong> &#8211; A test plan provides a framework on which different web requests and operations pertaining to a test can be added. The tool will execute these operations during run-time with multiple users (threads) as planned. Some of the important elements of a test plan are &#8211; Thread Group, Listeners, Logic controllers, assertions, etc.</p>
<p><strong>Samplers</strong> &#8211; Samplers are the components that are used to send requests to the server. The requests can be HTTP, FTP, SOAP, XML, JDBC and LDAP requests. For &#8216;Post requests&#8217;, post data can be found added in the parameter section of the samplers.</p>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/06/HTTP-Sampler.jpg"><img class="alignnone  wp-image-3225" src="http://www.perftesting.co.uk/wp-content/uploads/2012/06/HTTP-Sampler-300x197.jpg" alt="" width="300" height="197" /></a></p>
<p><strong>Controllers</strong> - You can group your Samplers (Requests) in controller. Controller thus helps to set order in which you wish the samplers to be processed. You can add a controller in another. Different controllers are &#8211; Simple controllers, Interleave controllers, While controller, If controller, Runtime controller, etc.</p>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/07/Controller1.jpg"><img class="alignnone size-full wp-image-3237" src="http://www.perftesting.co.uk/wp-content/uploads/2012/07/Controller1.jpg" alt="" width="251" height="286" /></a></p>
<p><strong>Assertions &#8211; </strong>Assertions are added to the samplers as child elements and they perform the task of checkpoints. There are different types of assertions. Some of them are &#8211; compare assertion, duration assertion, html assertion, etc.</p>
<p><strong>Timers</strong> &#8211; Timers are added to samplers to make a vuser wait at an after / before a sampler . We can add think times at a step using timers. Some types of timers that are most commonly used are &#8211; Constant timers, uniform random timer, etc.</p>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/07/Constant-Timer.jpg"><img class="alignnone size-full wp-image-3242" src="http://www.perftesting.co.uk/wp-content/uploads/2012/07/Constant-Timer.jpg" alt="" width="377" height="105" /></a></p>
<p><strong>Pre-processor elements</strong> &#8211; Preprocessors are added to modify samplers. They are usually used to update variables not extracted from response text or to modify settings of sample request just before it runs.<br />
Some preprocessor elements are -</p>
<ul>
<li>HTML Link Parser</li>
<li>HTTP URL Re writing modifier</li>
<li>HTML Parameter Mask</li>
<li>User parameters</li>
<li>Counter</li>
</ul>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/07/User-Parameters.jpg"><img class="alignnone  wp-image-3245" src="http://www.perftesting.co.uk/wp-content/uploads/2012/07/User-Parameters.jpg" alt="" width="644" height="279" /></a></p>
<p><strong>Postprocessor elements</strong> &#8211; Postprocessors execute once the request is made from the samplers. They are added as child to the samplers and this ensures that a particular postprocessor executes after a specific sampler. These elements are usually used to process response data and to extract a particular value from a response.<br />
Some widely used postprocessor elements are -</p>
<ul>
<li>Regular Expression Extractor</li>
<li>XPath Extractor</li>
<li>Save Responses to a file</li>
<li>Result Status Action Handler</li>
</ul>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/07/RegEx.jpg"><img class="alignnone size-full wp-image-3251" src="http://www.perftesting.co.uk/wp-content/uploads/2012/07/RegEx.jpg" alt="" width="735" height="305" /></a></p>
<p><strong>HTTP Proxy Server</strong> &#8211; The Proxy Server keeps a watch and record your actions while you browse your web application with normal browser. As one moves performing steps in the browser, corresponding web requests get recorded as samplers in the test plan and those can directly be added to the test plan when one plans to execute a test.</p>
<p><strong>HTTP Cookie Manager</strong> &#8211; This is another very important element of Jmeter. While replaying, Cookie manager stores cookies in the initial requests and sends them to the web server whenever required. It helps Jmeter function like a normal web browser.</p>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/07/HTTP-Cookie-Manager.jpg"><img class="alignnone size-full wp-image-3258" src="http://www.perftesting.co.uk/wp-content/uploads/2012/07/HTTP-Cookie-Manager.jpg" alt="" width="509" height="330" /></a></p>
<p><strong>Listeners</strong> - <strong></strong>During replay or test run, results of a sampler get saved in listeners in the form of tables, graphs, trees or simple text. Each listeners display response information in specific way. Eg &#8211; &#8216;View Resupts in table&#8217; enables one to view results in Table manner, with sample number, response time, response status, bytes, etc all in tabular format.</p>
<p>Some widely used Listeners are -</p>
<ul>
<li>Aggregate Graph</li>
<li>Aggregate Report</li>
<li>Assertion Report</li>
<li>Graph Results</li>
<li>Monitor Results</li>
<li>Summary report</li>
<li>View Results in Tree</li>
<li>View Results in Table</li>
</ul>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/07/View-Results-in-Table.jpg"><img class="alignnone size-full wp-image-3261" src="http://www.perftesting.co.uk/wp-content/uploads/2012/07/View-Results-in-Table.jpg" alt="" width="652" height="278" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Fstarting-with-jmeter-a-must-read-for-you%2F2012%2F07%2F11%2F&amp;title=Jmeter%20%26%238211%3B%20A%20Glossary%20of%20Terms" id="wpa2a_18"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/starting-with-jmeter-a-must-read-for-you/2012/07/11/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Revisiting Performance Testing Basics</title>
		<link>http://www.perftesting.co.uk/revisiting-performance-testing-basics/2012/06/30/</link>
		<comments>http://www.perftesting.co.uk/revisiting-performance-testing-basics/2012/06/30/#comments</comments>
		<pubDate>Sat, 30 Jun 2012 22:59:01 +0000</pubDate>
		<dc:creator>swaraj gupta</dc:creator>
				<category><![CDATA[Basic of Performance testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[Swaraj_Gupta]]></category>

		<guid isPermaLink="false">http://www.perftesting.co.uk/?p=2992</guid>
		<description><![CDATA[In this article, I have attempted to clarify some basic and most important terminologies and concepts pertaining to performance and the load testing arena. The Performance of web sites is increasingly becoming important. Companies are realising the importance of snappy performance. Losses caused to businesses due to poor performance issues can be huge (including the company&#8217;s image). Tracking the performance issues, analyzing and resolving those before the code moves to production is increasingly important. This increase in the need for performance across major verticals in the market is causing a spur in the industry. With such a rapid movement in the domain, many functional testers are dipping into  performance testing. Whilst learning these new technologies and tools many of the basics are missed; often it leads to a lot of re-work or an incorrect deliverable. To minimize this gap, I am writing this article. Protocol &#8211; A communications protocol is a set of procedures or rules to be followed for exchanging messages (communicating) between devices on a network. Protocols are structured using a layering scheme as a basis. Instead of using a single universal protocol to handle all transmission tasks, a set of cooperating protocols is used. These different protocols are governed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/05/ladder-climbing.jpg"><img class="alignleft size-thumbnail wp-image-2994" src="http://www.perftesting.co.uk/wp-content/uploads/2012/05/ladder-climbing-150x150.jpg" alt="" width="150" height="150" /></a>In this article, I have attempted to clarify some basic and most important terminologies and concepts pertaining to performance and the load testing arena.</p>
<p>The Performance of web sites is increasingly becoming important. Companies are realising the importance of snappy performance. Losses caused to businesses due to poor performance issues can be huge (including the company&#8217;s image). Tracking the performance issues, analyzing and resolving those before the code moves to production is increasingly important. This increase in the need for performance across major verticals in the market is causing a spur in the industry. With such a rapid movement in the domain, many functional testers are dipping into  performance testing. Whilst learning these new technologies and tools many of the basics are missed; often it leads to a lot of re-work or an incorrect deliverable. To minimize this gap, I am writing this article.<br />
<span id="more-2992"></span></p>
<p><span style="text-decoration: underline"><strong>Protocol &#8211; </strong></span></p>
<p>A communications protocol is a set of procedures or rules to be followed for exchanging messages (communicating) between devices on a network. Protocols are structured using a layering scheme as a basis. Instead of using a single universal protocol to handle all transmission tasks, a set of cooperating protocols is used. These different protocols are governed by different rules and thus serve different purpose each.</p>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/05/protocol.gif"><img class="alignleft size-medium wp-image-2995" src="http://www.perftesting.co.uk/wp-content/uploads/2012/05/protocol-289x300.gif" alt="" width="289" height="300" /></a>Examples –</p>
<ul>
<li>File Transfer Protocol (FTP) is used to transfer files from one host to another host over network.</li>
<li>HTTP (Hypertext Transfer Protocol) servers as a request- response protocol for distributed, collaborative, hypermedia information systems. It is the foundation of data communication for world wide web (www). It functions in the client-server computing model. In HTTP, a web-browser, acts as a client, while an application running on a computer hosting a web site functions as a server. The client submits an HTTP request message to the server. The server, which stores content, or provides resources, such as HTML files, returns a response message to the client.</li>
</ul>
<ul>
<li>SMTP (Simple Mail Transfer Protocol) is a protocol for sending e-mail messages between two servers. Most e-mail systems that send mail over the Internet use SMTP to send messages from one server to another; the messages can then be retrieved with an e-mail client using either POP or IMAP.<!--more--></li>
</ul>
<p><span style="text-decoration: underline"><strong>TCP/IP protocol Suite -</strong></span></p>
<p>The Internet protocol suite, commonly known as TCP/IP, is the set of communications protocols used for the Internet and is the most popular protocol stack for wide area networks. TCP stands for &#8216;Transmission Control Protocol&#8217; and IP stands for Internet Protocol. TCP/IP suite falls into 4 different layers -</p>
<p>Application layer: Process to process: On this layer, applications create user data and communicate this data to process (peers) on same or another host. Higher level protocols such as SMTP, FTP, SSH, HTTP, etc. operate on this layer.</p>
<p>Transport layer: Host-to-host: This layer deals with opening and maintaining connections between Internet hosts and constitutes the communication between two network hosts, either on the local network or remote networks. This is where flow-control, error-correction, and connection protocols, such as TCP, exist.</p>
<p>Internet layer: Internetworking: The internet layer has the task of exchanging data and establishing connections across network boundaries. Internet Protocol (IP) that defines IP addresses is a primary protocol in this layer.</p>
<p>Link layer: This layer defines the networking methods within the scope of the local network link on which hosts communicate without intervening routers.</p>
<p><strong><span style="text-decoration: underline">Browser Cookie</span> – </strong></p>
<p>Browser cookie also referred as web cookie is a piece of data stored within a browser by a website and then subsequently sent back to the website by the browser. Cookies help the websites (servers) remember actions that the browser (client) performed in the past – such as logging in. Cookies also serve the purpose of user authentication and if not implemented correctly, a cookie&#8217;s data can be intercepted by a hacker to gain unapproved access to the user&#8217;s data and possibly to the originating website.</p>
<p>In modern performance test tools, cookies are managed by the tool and hence a performance test engineer doesn’t have to manage the cookie information while automating an end user’s action. The tool maintains the cookie information within itself and provides the web server with the cookie information during run time. Tools like Loadrunner and SilkPerformer also store cache information for each vuser and help performance test engineers to replicate– first time user (no cache) or revisiting user (use stored cache) scenario.</p>
<p><!--more--></p>
<p><strong><span style="text-decoration: underline">Bandwidth</span> – </strong></p>
<p>In networking, bandwidth is the maximum channel capacity of a network communication path. This path is the channel connecting computing devices. In performance tests, when aspiration is to emulate test more close to real time situation, bandwidth restrictions are also taken into consideration. Modern performance test tools provide us with the feature of putting network / bandwidth related restrictions. In loadrunner, this can be done using ‘speed simulation in ‘run time settings’. In SilkPerformer, this can be done by changing ‘Internet settings’ in ‘Active profile settings’.</p>
<p><strong>LoadRunner Network Bandwidth Settings - </strong></p>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/05/LR_NetworkSettings1.jpg"><img class="alignnone size-medium wp-image-3091" src="http://www.perftesting.co.uk/wp-content/uploads/2012/05/LR_NetworkSettings1-300x104.jpg" alt="" width="300" height="104" /></a></p>
<p><strong>SilkPerformer Network Settings - </strong></p>
<p><a href="http://www.perftesting.co.uk/wp-content/uploads/2012/05/SP_NetworkSettings.png"><img class="alignnone size-medium wp-image-3092" src="http://www.perftesting.co.uk/wp-content/uploads/2012/05/SP_NetworkSettings-300x179.png" alt="" width="300" height="179" /></a></p>
<p>Bandwidth simulation can be achieved more effectively by using WAN emulators.</p>
<p><!--more--></p>
<p><strong><span style="text-decoration: underline">WAN emulation</span> – </strong></p>
<p>WAN emulation is creating a network scenario in the test environment, exactly similar to production environment (real-time, end user scenario). This can be achieved using WAN emulation tools. Popular amongst those are – WANem, Shunra, etc.</p>
<p>WAN emulation thus allows the performance test team to setup a transparent application gateway which can be used to simulate WAN characteristics like Network delay, Packet loss, Packet corruption, Disconnections, Packet re-ordering, Jitter, etc.</p>
<p><strong><span style="text-decoration: underline">IP Spoofing</span> – </strong></p>
<p>IP spoofing in performance test domain is assigning different IP addresses to different VUsers during a performance test. This helps the web server identify requests coming from different vusers as the ones coming from different machines, thus taking the test to more real time scenario. IP Spoofing in performance center can be done in scenarios section.</p>
<p><!--more--></p>
<p>Most application development team have moved onto an AGILE environment. This Agility in the software development process is opening more doors within performance testing domain. The aspiration in past was ‘resolving performance issues post app development’. The target now is ‘tracking performance issues right from the first day of development’. The need of performance test experts both conceptually and practically (tool knowledge) is going to increase. The questions that remains is – How will you leverage this opportunity?</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.perftesting.co.uk%2Frevisiting-performance-testing-basics%2F2012%2F06%2F30%2F&amp;title=Revisiting%20Performance%20Testing%20Basics" id="wpa2a_20"><img src="http://www.perftesting.co.uk/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.perftesting.co.uk/revisiting-performance-testing-basics/2012/06/30/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

 Served from: perftesting.co.uk @ 2013-05-21 16:18:08 by W3 Total Cache -->
