Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000507.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
11
12    <title>Status for Andrew DeFaria: pulse</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/000506.html" title="Clearcase Modules/log_activity" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000508.html" title="cvsims/Vobs" />
17
18    
19
20    
21
22    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
23 </head>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
25    <div id="container">
26       <div id="container-inner" class="pkg">
27
28          <div id="banner">
29             <div id="banner-inner" class="pkg">
30                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31                <h2 id="banner-description">Searchable status reports and work log</h2>
32             </div>
33          </div>
34
35          <div id="pagebody">
36             <div id="pagebody-inner" class="pkg">
37                <div id="alpha">
38                   <div id="alpha-inner" class="pkg">
39
40                      <p class="content-nav">
41                         <a href="http://defaria.com/blogs/Status/archives/000506.html">&laquo; Clearcase Modules/log_activity</a> |
42                         <a href="http://defaria.com/blogs/Status/">Main</a>
43                         | <a href="http://defaria.com/blogs/Status/archives/000508.html">cvsims/Vobs &raquo;</a>
44                      </p>
45
46                      <a id="a000507"></a>
47                      <div class="entry" id="entry-507">
48                         <h3 class="entry-header">pulse</h3>
49                         <div class="entry-content">
50                            <div class="entry-body">
51                               <ul>
52   <li>Added some functionality to Clearcase::Vob and Clearcase::View</li>
53
54   <li>Coded a pulse script which performs a pulse checking by checking out and in a file 10 times. If the pulse takes more than 60 seconds then an error is reported</li>
55 </ul>
56                            </div>
57                            <div id="more" class="entry-more">
58                               <h2>Pulse</h2>
59
60 <p>I decided to make the pulse script part of a larger project so I created a perf subdirectory under cc. The idea here is that pulse is a sort of performance test - a "sanity performance test" if you will. In general the script does the following:</p>
61
62 <ul>
63   <li>Creates a logfile (pulse.log)</li>
64
65   <li>Creates a new view (default) if required</li>
66
67   <li>Sets context to that view</li>
68
69   <li>Changes directory to the view to the vob (/vobs/adm by default)</li>
70
71   <li>Performs 10 checkouts and checkins of a relatively large file (a copy of firefox.exe which is ~7 Meg)</li>
72
73   <li>Compares the time that those checkouts and checkins took against a threshold (default 60) and reports an error if it took too long</li>
74 </ul>
75
76 <p>Here is a usage:</p>
77
78 <div class="code"><pre>
79 ccase-rmna-3:export SITE_PERL_LIBPATH=~/SCM/lib
80 ccase-rmna-3:pulse -u
81 Usage:  pulse (v1.0) [-u] [-v] [-d] [-view <viewtag>] [-vob <vobtag>]
82         [-element <element>] [-t <n>] [-i <n>]
83
84 Where:
85
86   -u:       Display usage
87   -v:       Turn on verbose mode
88   -d:       Turn on debug mode
89   -view:    View tag to create/use (Default: default)
90   -vob:     Vob tag to use (Default /vobs/adm)
91   -element: Vob relative path to element to checkout/in (Default: firefox.exe)
92   -t <n>:   Threshold of what is "too long" (Default 60 seconds)
93   -i <n>:   Number of iterations (default 10)
94 </pre></div>
95
96 <p>Here's an example of the log file produced:</p>
97
98 <div class="code"><pre>
99 pulse: 12/30/2005 @ 12:27: Performing 10 checkout/ins in view default vob /vobs/adm of element firefox.exe
100 pulse: 12/30/2005 @ 12:28: Finished in 36 seconds
101 pulse: 12/30/2005 @ 12:28: Performing 10 checkout/ins in view default vob /vobs/adm of element firefox.exe
102 pulse: 12/30/2005 @ 12:29: Finished in 35 seconds
103 </pre></div>
104 <p>Several issues came up when attempting to code this script. For example:</p>
105
106 <ul>
107   <li>Which view should this operate in?</li>
108
109   <li>Which vob should this operate in?</li>
110
111   <li>How will we assure that this vob exists at any site that we want to run pulse? Perhaps we should make a vob for performance testing only (e.g. /vobs/perf).</li>
112
113   <li>Checking out and in a single element creates many versions on the version tree. If this pulse script was run every hour then 240 versions would be created in only one day. It would be better to more properly "setup" and "teardown" the whole environment but this would be considerably more complex and time consuming. For example, pulse could create the view, create the vob, formulate some elements and do mkelems on them, do the checkouts and checkins, do rmelems and remove the vob and view, etc. That's a lot! Alternately it could simply do the mkelems, the checkouts and checkins, then do rmelems but that brings up the issue of where does the source come for the mkelems? Also, typically there's a trigger to prevent rmelem...</li>
114
115   <li>Currently the script is pretty Unix centric. For example, it uses cleartool lsview -stgloc -auto. This works on Unix but for some reason -stgloc doesn't work on Windows. I also suspect that at the various sites usage of -stgloc might not be that reliable.</li>
116
117   <li>Also the view used is a dynamic view. Should a snapshot version be coded?</li>
118
119   <li>Current the script uses /vobs/<vobname> for a vob tag. In fact it uses /vobs/adm. This is not a Windows vob tag so the script will not work on Windows</li>
120
121   <li>The script does sport paramaters to change things such as the view used, the vob used and the element to checkout and in. The defaults are great but then again we don't have a performance testing environment setup and replicated yet</li>
122
123   <li>Currently the script logs it's activity to a log file but it's not in a great format for analysis. The TimeUtils module I'm using only as 1 second resolution. I'm not sure how much analysis of this logfile is desired</li>
124
125   <li>There is no facility for emailing alerts when the script determines that things are taking too long</li>
126                            </div>
127                         </div>
128                         <p class="entry-footer">
129                            <span class="post-footers">Posted by  on December 30, 2005 10:57 AM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000507.html">Permalink</a>
130                         </p>
131                      </div>
132
133                      
134
135                      
136                   </div>
137                </div>
138             </div>
139          </div>
140       </div>
141    </div>
142 </body>
143 </html>