<meta name="GENERATOR" content="OpenOffice.org 2.0-pre (Linux)" /><meta name="AUTHOR" content="Gary Leeson" /><meta name="CREATED" content="20060903;21231800" /><meta name="CHANGEDBY" content="Gary Leeson" /><meta name="CHANGED" content="20060903;22120900" /><br /> <style> <!-- @page { size: 21cm 29.7cm; margin: 2cm } P { margin-bottom: 0.21cm } --> </style> </p> <p style="margin-bottom: 0cm">Do you know how well your application functions? Can you tell me what is the average time for a request to be handled? the worst? Can you tell me how your application functions with time? If not then you have missed one of the most common “unwrittenâ€? requirements – that of instrumenting your code.</p> <p style="margin-bottom: 0cm"> <p style="margin-bottom: 0cm">Hang-on I hear you say!! you can profile the application and unit tests can give you this information. Yes this may be true, but it is never a substitute for building into your code instrumentation as you go along. You will never know when it will come handy, and anyway testing your code on your development machine is rarely anything like running it on the real deployment environment.</p> <p style="margin-bottom: 0cm"> <p style="margin-bottom: 0cm">For example, many years ago I developed some middle-ware for a large and very profitable international corporation. The piece of code was to mediate between the front-end and the back-end billing/resource system. Development went well and as usual I inserted instrumentation as I went along before the product was released into the production environment under the watchful eye of application management group. To help roll out the product there was a massive marketing campaign – TV, billboards the whole nine yards; first time I have ever seem anything I developed up on TV.</p> <p style="margin-bottom: 0cm"> <p style="margin-bottom: 0cm">About a month latter my line manager (a really nice lady) came to me and said “Gary there seems to be a problem with the system; I have just had my arse kicked by sales and marketing. The product is a great success but there are a lot of unhappy customers who get ‘time out’ errors from the GUI, and the GUI guys say its because the connection to your middle ware is timing out, and the applications support environment says the 3 machines in the deployment cluster are fine. Could you investigate and get back to me?â€? Sound familiar? Talk about a bombshell and a potential career limiting move. With the manager there I said “lets look at the instrumentation and performance screensâ€?; A couple of minutes latter the situation came clear. Two of the three machines in the middle-ware cluster were “downâ€? for the times and periods mentioned but for different reasons; one machine was “upâ€? and running but there were no performance metrics; the other machine was not up at all!!! So in effect we were running at 1/3<sup>rd</sup> capacity – no wonder we had problems. We paid a quick visit to application support. To cut a long story short, it turned out the machine which was down was “being upgradedâ€? – why that was done in the “busy periodâ€? and why it took a week would be another article; the machine that was “upâ€? but had no statistics turned out not to be included in the cluster configuration at all!!!</p> <p style="margin-bottom: 0cm"> <p style="margin-bottom: 0cm">These were soon fixed and everything went smoothly – especially when I wrote a script to monitor the scripts and analyze the results. So my manager would then know on a day/week/month basis how many actual transactions went through the system, how long they took, what the system throughput was and what we were capable of supporting, when the transactions took place. As a result my manager did not need to ask sales and marketing how many sales went through, and did not need to access application support unless from the statistics she was told one or more of the servers was down – where upon, she went looking for application support.</p> <p style="margin-bottom: 0cm"> <p style="margin-bottom: 0cm">I suppose the moral of this little story is if you don’t instrument your code you will never know you have a problem until someone with more power and clout than you comes looking for you with a big club embedded with nails and a very bad attitude.</p> <p style="margin-bottom: 0cm"> <p style="margin-bottom: 0cm">In the next blog I will go through the types of instrumentation and performance metrics are useful to put in your code.</p> <p style="margin-bottom: 0cm"> <p style="margin-bottom: 0cm"> <p style="margin-bottom: 0cm"> <p style="margin-bottom: 0cm"><!--86fcc9be86da0c6bc50d3b0f1e4167c7--></p> <div class="post-info"> </div> <!-- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> <rdf:Description rdf:about="http://www.garyleeson.com/index.php/2006/09/03/instrument-your-code-young-man-and-do-it-now-part-1/" dc:identifier="http://www.garyleeson.com/index.php/2006/09/03/instrument-your-code-young-man-and-do-it-now-part-1/" dc:title="Instrument your code young man…. and do it now (Part 1)" trackback:ping="http://www.garyleeson.com/index.php/2006/09/03/instrument-your-code-young-man-and-do-it-now-part-1/trackback/" /> </rdf:RDF> --> <div class="post-footer"> </div> </div> <div class="navigation"> <div class="aligncenter">« <a href="../../../08/22/rest-is-not-just-java-servlets/index.html">REST is not just Java Servlets!!!</a> | <a href="../../11/instrument-your-code-young-man-part-2/index.html">Instrument your code young man – Part 2</a> »</div> </div> <div class="post-footer"> </div> <!-- You can start editing here. --> <div class="boxcomments"> <h2 id="comments"> No Responses to “ Instrument your code young man…. and do it now (Part 1) ” </h2> <!-- If comments are closed. --> <p id="comments-closed">Sorry, comments for this entry are closed at this time.</p> </div><!-- end boxcomments --> </div> <!--- middle (main content) column content end --> </div> <div id="sidebar"> <ul> <li id="archivedentry"> <h2>Archived Entry</h2> <ul> <li><strong>Post Date :</strong></li> <li>Sunday, Sep 3rd, 2006 at 10:06 pm</li> <li><strong>Category :</strong></li> <li><a href="../../../../category/tech/application-servers/index.html" title="View all posts in Application Servers" rel="category tag">Application Servers</a> and <a href="../../../../category/tech/java/index.html" title="View all posts in Java" rel="category tag">Java</a> and <a href="../../../../category/tech/index.html" title="View all posts in Tech" rel="category tag">Tech</a></li> <li><strong>Tags :</strong></li> <li></li> <li><strong>Do More :</strong></li> <li>Both comments and pings are currently closed. </li> </ul> </li> <li id="calendar"> <table id="wp-calendar" summary="Calendar"> <caption>September 2006</caption> <thead> <tr> <th abbr="Monday" scope="col" title="Monday">M</th> <th abbr="Tuesday" scope="col" title="Tuesday">T</th> <th abbr="Wednesday" scope="col" title="Wednesday">W</th> <th abbr="Thursday" scope="col" title="Thursday">T</th> <th abbr="Friday" scope="col" title="Friday">F</th> <th abbr="Saturday" scope="col" title="Saturday">S</th> <th abbr="Sunday" scope="col" title="Sunday">S</th> </tr> </thead> <tfoot> <tr> <td abbr="August" colspan="3" id="prev"><a href="../../../08/index.html" title="View posts for August 2006">« Aug</a></td> <td class="pad"> </td> <td abbr="October" colspan="3" id="next"><a href="../../../10/index.html" title="View posts for October 2006">Oct »</a></td> </tr> </tfoot> <tbody> <tr> <td colspan="4" class="pad"> </td><td>1</td><td>2</td><td><a href="../index.html" title="Instrument your code young man…. and do it now (Part 1)">3</a></td> </tr> <tr> <td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td> </tr> <tr> <td><a href="../../11/index.html" title="Instrument your code young man – Part 2">11</a></td><td>12</td><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td> </tr> <tr> <td>18</td><td>19</td><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td> </tr> <tr> <td>25</td><td>26</td><td>27</td><td>28</td><td>29</td><td>30</td> <td class="pad" colspan="1"> </td> </tr> </tbody> </table> </li> <li id="recent-posts-3" class="widget widget_recent_entries"> <h2>Recent Posts</h2><ul><li> <ul> <li><a href="../../../../2015/03/04/maeves-a-hacker/index.html" title="Maeve’s a “Hacker”">Maeve’s a “Hacker” </a></li> <li><a href="../../../../2015/02/21/action-maeve/index.html" title="Action Maeve">Action Maeve </a></li> <li><a href="../../../../2015/02/14/valentines-meal/index.html" title="Valentines Meal">Valentines Meal </a></li> <li><a href="../../../../2014/10/10/excitement-and-car-crashes-in-donabate/index.html" title="Excitement and car crashes in Donabate">Excitement and car crashes in Donabate </a></li> <li><a href="../../../../2014/10/09/love-can-be-a-surprising-thing/index.html" title="Love can be a surprising thing">Love can be a surprising thing </a></li> </ul> </li></ul></li> <li id="search"> <h2><label for="s">Search:</label></h2> <ul> <li> <form id="searchform" method="get" action="http://www.garyleeson.com/index.php/2006/09/03/instrument-your-code-young-man-and-do-it-now-part-1/"> <div style="text-align:center"> <p><input type="text" name="s" id="s" size="15" /></p> <p><input type="submit" name="submit" value="Search" /></p> </div> </form> </li> </ul> </li> <li id="meta-4" class="widget widget_meta"><h2>Meta</h2><ul><li> <ul> <li><a href="../../../../../wp-login.html">Log in</a></li> <li><a href="../../../../feed/index.html" title="Syndicate this site using RSS 2.0">Entries <abbr title="Really Simple Syndication">RSS</abbr></a></li> <li><a href="../../../../comments/feed/index.html" title="The latest comments to all posts in RSS">Comments <abbr title="Really Simple Syndication">RSS</abbr></a></li> <li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress.org</a></li> </ul> </li></ul></li><li id="twitter-1" class="widget widget_twitter"><h2><a href="http://twitter.com/garyleeson" class="twitter_title_link">Twitter</a></h2><ul><li><ul class="twitter"><li>No public Twitter messages.</li></ul></li></ul></li> </ul> </div> <div id="footer"> <p><small> <a href="../../../../../index.html" title="Gremlin’s Fireside Chat">Gremlin’s Fireside Chat</a> is powered by <a href="http://wordpress.org/" title="Powered by WordPress 2.8, state-of-the-art semantic personal publishing platform">WordPress 2.8</a> and delivered to you in 1.394 seconds using 30 queries. <br /> Theme: <a href="http://ajaydsouza.com/wordpress/wpthemes/connections-reloaded/" title="Powered by Connections Reloaded">Connections Reloaded v2.1</a> by <a href="http://ajaydsouza.com/" title="Visit Ajay's Blog">Ajay D'Souza</a>. Derived from <a href="http://vanillamist.com/blog/" title="Connections Theme">Connections</a>. </small></p> <script src="http://stats.wordpress.com/e-201511.js" type="text/javascript"></script> <script type="text/javascript"> st_go({blog:'14205214',v:'ext',post:'15'}); var load_cmc = function(){linktracker_init(14205214,15,2);}; if ( typeof addLoadEvent != 'undefined' ) addLoadEvent(load_cmc); else load_cmc(); </script> </div> <!-- End id="footer" --> </div> <!-- End id="main" --> </div> <!-- End id="rap" --> </body> <!-- Mirrored from www.garyleeson.com/index.php/2006/09/03/instrument-your-code-young-man-and-do-it-now-part-1/ by HTTrack Website Copier/3.x [XR&CO'2013], Sat, 14 Mar 2015 18:38:49 GMT --> </html>