"Fossies" - the Fresh Open Source Software Archive

Member "docs/phpcrawl/PHPCrawlerBenchmark.html" (20 Jan 2013, 19239 Bytes) of package /linux/www/SitemapCreator.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <?xml version="1.0" encoding="iso-8859-1"?>
    2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    3   <html xmlns="http://www.w3.org/1999/xhtml">
    4         <head>
    5             <!-- template designed by Marco Von Ballmoos -->
    6             <title>Docs For Class PHPCrawlerBenchmark</title>
    7             <link rel="stylesheet" href="../media/stylesheet.css" />
    8             <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
    9         </head>
   10         <body>
   11             <div class="page-body">         
   12 <h2 class="class-name">Class PHPCrawlerBenchmark</h2>
   13 
   14 <a name="sec-description"></a>
   15 <div class="info-box">
   16     <div class="info-box-title">Description</div>
   17     <div class="nav-bar">
   18                     <span class="disabled">Description</span> |
   19                                                     <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
   20                         |                                           <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
   21                         
   22                     </div>
   23     <div class="info-box-body">
   24                 <!-- ========== Info from phpDoc block ========= -->
   25 <p class="short-description">A static benchmark-class for doing benchmarks within phpcrawl.</p>
   26 <p class="description"><p>Example:  <div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-id"><a href="../phpcrawl/PHPCrawlerBenchmark.html">PHPCrawlerBenchmark</a></span><span class="src-sym">::</span><a href="../phpcrawl/PHPCrawlerBenchmark.html#methodstart">start</a><span class="src-sym">(</span><span class="src-str">&quot;benchmark1&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
   27 <li><div class="src-line">&nbsp;<a href="http://www.php.net/sleep">sleep</a><span class="src-sym">(</span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
   28 <li><div class="src-line">&nbsp;<span class="src-id"><a href="../phpcrawl/PHPCrawlerBenchmark.html">PHPCrawlerBenchmark</a></span><span class="src-sym">::</span><a href="../phpcrawl/PHPCrawlerBenchmark.html#methodstop">stop</a><span class="src-sym">(</span><span class="src-str">&quot;benchmark1&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
   29 <li><div class="src-line">&nbsp;echo&nbsp;<span class="src-id"><a href="../phpcrawl/PHPCrawlerBenchmark.html">PHPCrawlerBenchmark</a></span><span class="src-sym">::</span><a href="../phpcrawl/PHPCrawlerBenchmark.html#methodgetElapsedTime">getElapsedTime</a><span class="src-sym">(</span><span class="src-str">&quot;benchmark1&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
   30 </ol></div></p></p>
   31         <p class="notes">
   32             Located in <a class="field" href="_libs---PHPCrawler---PHPCrawlerBenchmark.class.php.html">/libs/PHPCrawler/PHPCrawlerBenchmark.class.php</a> (line <span class="field">16</span>)
   33         </p>
   34         
   35                 
   36         <pre></pre>
   37     
   38             </div>
   39 </div>
   40 
   41 
   42 
   43     <a name="sec-var-summary"></a>
   44     <div class="info-box">
   45         <div class="info-box-title">Variable Summary</span></div>
   46         <div class="nav-bar">
   47             <a href="#sec-description">Description</a> |
   48                         <span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
   49                             | 
   50                                     <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
   51                             
   52                                 </div>
   53         <div class="info-box-body">
   54             <div class="var-summary">
   55                                                 <div class="var-title">
   56                     static <span class="var-type">mixed</span>
   57                     <a href="#$benchmark_results" title="details" class="var-name">$benchmark_results</a>
   58                 </div>
   59                                                                 <div class="var-title">
   60                     static <span class="var-type">mixed</span>
   61                     <a href="#$benchmark_startcount" title="details" class="var-name">$benchmark_startcount</a>
   62                 </div>
   63                                                                 <div class="var-title">
   64                     static <span class="var-type">mixed</span>
   65                     <a href="#$benchmark_starttimes" title="details" class="var-name">$benchmark_starttimes</a>
   66                 </div>
   67                                                                 <div class="var-title">
   68                     static <span class="var-type">mixed</span>
   69                     <a href="#$temporary_benchmarks" title="details" class="var-name">$temporary_benchmarks</a>
   70                 </div>
   71                                                                                                                                                                                             </div>
   72         </div>
   73     </div>
   74 
   75     <a name="sec-method-summary"></a>
   76     <div class="info-box">
   77         <div class="info-box-title">Method Summary</span></div>
   78         <div class="nav-bar">
   79             <a href="#sec-description">Description</a> |
   80                                                                         <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
   81                  
   82                 |
   83                         <span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
   84         </div>
   85         <div class="info-box-body">         
   86             <div class="method-summary">
   87                                                 <div class="method-definition">
   88                     static                      <span class="method-result">array</span>
   89                                         <a href="#getAllBenchmarks" title="details" class="method-name">getAllBenchmarks</a>
   90                                         ()
   91                                     </div>
   92                                                                 <div class="method-definition">
   93                     static                      <span class="method-result">void</span>
   94                                         <a href="#getCallCount" title="details" class="method-name">getCallCount</a>
   95                                             (<span class="var-type"></span>&nbsp;<span class="var-name">$identifier</span>)
   96                                     </div>
   97                                                                 <div class="method-definition">
   98                     static                      <span class="method-result">float</span>
   99                                         <a href="#getElapsedTime" title="details" class="method-name">getElapsedTime</a>
  100                                             (<span class="var-type">string</span>&nbsp;<span class="var-name">$identifier</span>)
  101                                     </div>
  102                                                                 <div class="method-definition">
  103                     static                      <span class="method-result">float</span>
  104                                         <a href="#getmicrotime" title="details" class="method-name">getmicrotime</a>
  105                                         ()
  106                                     </div>
  107                                                                 <div class="method-definition">
  108                     static                      <span class="method-result">void</span>
  109                                         <a href="#printAllBenchmarks" title="details" class="method-name">printAllBenchmarks</a>
  110                                             ([<span class="var-type"></span>&nbsp;<span class="var-name">$linebreak</span> = <span class="var-default">&quot;&lt;br /&gt;&quot;</span>])
  111                                     </div>
  112                                                                 <div class="method-definition">
  113                     static                      <span class="method-result">void</span>
  114                                         <a href="#reset" title="details" class="method-name">reset</a>
  115                                             (<span class="var-type"></span>&nbsp;<span class="var-name">$identifier</span>)
  116                                     </div>
  117                                                                 <div class="method-definition">
  118                     static                      <span class="method-result">void</span>
  119                                         <a href="#resetAll" title="details" class="method-name">resetAll</a>
  120                                             ([<span class="var-type"></span>&nbsp;<span class="var-name">$retain_benchmarks</span> = <span class="var-default">array()</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$retain_benachmarks</span>)
  121                                     </div>
  122                                                                 <div class="method-definition">
  123                     static                      <span class="method-result">void</span>
  124                                         <a href="#start" title="details" class="method-name">start</a>
  125                                             (<span class="var-type"></span>&nbsp;<span class="var-name">$identifier</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$temporary_benchmark</span> = <span class="var-default">false</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$identifie</span>)
  126                                     </div>
  127                                                                 <div class="method-definition">
  128                     static                      <span class="method-result">void</span>
  129                                         <a href="#stop" title="details" class="method-name">stop</a>
  130                                             (<span class="var-type">string</span>&nbsp;<span class="var-name">$identifier</span>)
  131                                     </div>
  132                                 
  133                                                                                                                                                                                                                                                                                                                 </div>
  134         </div>
  135     </div>      
  136 
  137     <a name="sec-vars"></a>
  138     <div class="info-box">
  139         <div class="info-box-title">Variables</div>
  140         <div class="nav-bar">
  141             <a href="#sec-description">Description</a> |
  142                                         <a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
  143                         
  144             
  145                                         | 
  146                                     <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
  147                             
  148                     </div>
  149         <div class="info-box-body">
  150             <a name="var$benchmark_results" id="$benchmark_results"><!-- --></A>
  151 <div class="evenrow">
  152 
  153     <div class="var-header">
  154         <span class="var-title">
  155             static <span class="var-type">mixed</span>
  156             <span class="var-name">$benchmark_results</span>
  157              = <span class="var-default">array()</span>         (line <span class="line-number">18</span>)
  158         </span>
  159     </div>
  160 
  161     <!-- ========== Info from phpDoc block ========= -->
  162     <ul class="tags">
  163                 <li><span class="field">access:</span> protected</li>
  164             </ul>
  165     
  166     
  167         
  168         
  169 
  170 </div>
  171 <a name="var$benchmark_startcount" id="$benchmark_startcount"><!-- --></A>
  172 <div class="oddrow">
  173 
  174     <div class="var-header">
  175         <span class="var-title">
  176             static <span class="var-type">mixed</span>
  177             <span class="var-name">$benchmark_startcount</span>
  178              = <span class="var-default">array()</span>         (line <span class="line-number">20</span>)
  179         </span>
  180     </div>
  181 
  182     <!-- ========== Info from phpDoc block ========= -->
  183     <ul class="tags">
  184                 <li><span class="field">access:</span> protected</li>
  185             </ul>
  186     
  187     
  188         
  189         
  190 
  191 </div>
  192 <a name="var$benchmark_starttimes" id="$benchmark_starttimes"><!-- --></A>
  193 <div class="evenrow">
  194 
  195     <div class="var-header">
  196         <span class="var-title">
  197             static <span class="var-type">mixed</span>
  198             <span class="var-name">$benchmark_starttimes</span>
  199              = <span class="var-default">array()</span>         (line <span class="line-number">19</span>)
  200         </span>
  201     </div>
  202 
  203     <!-- ========== Info from phpDoc block ========= -->
  204     <ul class="tags">
  205                 <li><span class="field">access:</span> protected</li>
  206             </ul>
  207     
  208     
  209         
  210         
  211 
  212 </div>
  213 <a name="var$temporary_benchmarks" id="$temporary_benchmarks"><!-- --></A>
  214 <div class="oddrow">
  215 
  216     <div class="var-header">
  217         <span class="var-title">
  218             static <span class="var-type">mixed</span>
  219             <span class="var-name">$temporary_benchmarks</span>
  220              = <span class="var-default">array()</span>         (line <span class="line-number">21</span>)
  221         </span>
  222     </div>
  223 
  224     <!-- ========== Info from phpDoc block ========= -->
  225     <ul class="tags">
  226                 <li><span class="field">access:</span> protected</li>
  227             </ul>
  228     
  229     
  230         
  231         
  232 
  233 </div>
  234                         
  235         </div>
  236     </div>
  237     
  238     <a name="sec-methods"></a>
  239     <div class="info-box">
  240         <div class="info-box-title">Methods</div>
  241         <div class="nav-bar">
  242             <a href="#sec-description">Description</a> |
  243                                                             <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
  244                                                                     <a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
  245                         
  246         </div>
  247         <div class="info-box-body">
  248             <A NAME='method_detail'></A>
  249 <a name="methodgetAllBenchmarks" id="getAllBenchmarks"><!-- --></a>
  250 <div class="evenrow">
  251     
  252     <div class="method-header">
  253         <span class="method-title">static method getAllBenchmarks</span> (line <span class="line-number">129</span>)
  254     </div> 
  255     
  256     <!-- ========== Info from phpDoc block ========= -->
  257 <p class="short-description">Returns all registered benchmark-results.</p>
  258     <ul class="tags">
  259                 <li><span class="field">return:</span> associative Array. The keys are the benchmark-identifiers, the values the benchmark-times.</li>
  260                 <li><span class="field">access:</span> public</li>
  261             </ul>
  262     
  263     <div class="method-signature">
  264         static
  265         <span class="method-result">array</span>
  266         <span class="method-name">
  267             getAllBenchmarks
  268         </span>
  269                 ()
  270             </div>
  271     
  272         
  273             
  274     </div>
  275 <a name="methodgetCallCount" id="getCallCount"><!-- --></a>
  276 <div class="oddrow">
  277     
  278     <div class="method-header">
  279         <span class="method-title">static method getCallCount</span> (line <span class="line-number">44</span>)
  280     </div> 
  281     
  282     <!-- ========== Info from phpDoc block ========= -->
  283     <ul class="tags">
  284                 <li><span class="field">access:</span> public</li>
  285             </ul>
  286     
  287     <div class="method-signature">
  288         static
  289         <span class="method-result">void</span>
  290         <span class="method-name">
  291             getCallCount
  292         </span>
  293                     (<span class="var-type"></span>&nbsp;<span class="var-name">$identifier</span>)
  294             </div>
  295     
  296             <ul class="parameters">
  297                     <li>
  298                 <span class="var-type"></span>
  299                 <span class="var-name">$identifier</span>           </li>
  300                 </ul>
  301         
  302             
  303     </div>
  304 <a name="methodgetElapsedTime" id="getElapsedTime"><!-- --></a>
  305 <div class="evenrow">
  306     
  307     <div class="method-header">
  308         <span class="method-title">static method getElapsedTime</span> (line <span class="line-number">71</span>)
  309     </div> 
  310     
  311     <!-- ========== Info from phpDoc block ========= -->
  312 <p class="short-description">Gets the elapsed time for the given benchmark.</p>
  313     <ul class="tags">
  314                 <li><span class="field">return:</span> The elapsed time in seconds and miliseconds (e.g. 1.74343)</li>
  315                 <li><span class="field">access:</span> public</li>
  316             </ul>
  317     
  318     <div class="method-signature">
  319         static
  320         <span class="method-result">float</span>
  321         <span class="method-name">
  322             getElapsedTime
  323         </span>
  324                     (<span class="var-type">string</span>&nbsp;<span class="var-name">$identifier</span>)
  325             </div>
  326     
  327             <ul class="parameters">
  328                     <li>
  329                 <span class="var-type">string</span>
  330                 <span class="var-name">$identifier</span><span class="var-description">: The benchmark name/identifier.</span>          </li>
  331                 </ul>
  332         
  333             
  334     </div>
  335 <a name="methodgetmicrotime" id="getmicrotime"><!-- --></a>
  336 <div class="oddrow">
  337     
  338     <div class="method-header">
  339         <span class="method-title">static method getmicrotime</span> (line <span class="line-number">147</span>)
  340     </div> 
  341     
  342     <!-- ========== Info from phpDoc block ========= -->
  343 <p class="short-description">Returns the current time in seconds and milliseconds.</p>
  344     <ul class="tags">
  345                 <li><span class="field">access:</span> public</li>
  346             </ul>
  347     
  348     <div class="method-signature">
  349         static
  350         <span class="method-result">float</span>
  351         <span class="method-name">
  352             getmicrotime
  353         </span>
  354                 ()
  355             </div>
  356     
  357         
  358             
  359     </div>
  360 <a name="methodprintAllBenchmarks" id="printAllBenchmarks"><!-- --></a>
  361 <div class="evenrow">
  362     
  363     <div class="method-header">
  364         <span class="method-title">static method printAllBenchmarks</span> (line <span class="line-number">115</span>)
  365     </div> 
  366     
  367     <!-- ========== Info from phpDoc block ========= -->
  368     <ul class="tags">
  369                 <li><span class="field">access:</span> public</li>
  370             </ul>
  371     
  372     <div class="method-signature">
  373         static
  374         <span class="method-result">void</span>
  375         <span class="method-name">
  376             printAllBenchmarks
  377         </span>
  378                     ([<span class="var-type"></span>&nbsp;<span class="var-name">$linebreak</span> = <span class="var-default">&quot;&lt;br /&gt;&quot;</span>])
  379             </div>
  380     
  381             <ul class="parameters">
  382                     <li>
  383                 <span class="var-type"></span>
  384                 <span class="var-name">$linebreak</span>            </li>
  385                 </ul>
  386         
  387             
  388     </div>
  389 <a name="methodreset" id="reset"><!-- --></a>
  390 <div class="oddrow">
  391     
  392     <div class="method-header">
  393         <span class="method-title">static method reset</span> (line <span class="line-number">82</span>)
  394     </div> 
  395     
  396     <!-- ========== Info from phpDoc block ========= -->
  397 <p class="short-description">Resets the clock for the given benchmark.</p>
  398     <ul class="tags">
  399                 <li><span class="field">access:</span> public</li>
  400             </ul>
  401     
  402     <div class="method-signature">
  403         static
  404         <span class="method-result">void</span>
  405         <span class="method-name">
  406             reset
  407         </span>
  408                     (<span class="var-type"></span>&nbsp;<span class="var-name">$identifier</span>)
  409             </div>
  410     
  411             <ul class="parameters">
  412                     <li>
  413                 <span class="var-type"></span>
  414                 <span class="var-name">$identifier</span>           </li>
  415                 </ul>
  416         
  417             
  418     </div>
  419 <a name="methodresetAll" id="resetAll"><!-- --></a>
  420 <div class="evenrow">
  421     
  422     <div class="method-header">
  423         <span class="method-title">static method resetAll</span> (line <span class="line-number">95</span>)
  424     </div> 
  425     
  426     <!-- ========== Info from phpDoc block ========= -->
  427 <p class="short-description">Resets all clocks for all benchmarks.</p>
  428     <ul class="tags">
  429                 <li><span class="field">access:</span> public</li>
  430             </ul>
  431     
  432     <div class="method-signature">
  433         static
  434         <span class="method-result">void</span>
  435         <span class="method-name">
  436             resetAll
  437         </span>
  438                     ([<span class="var-type"></span>&nbsp;<span class="var-name">$retain_benchmarks</span> = <span class="var-default">array()</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$retain_benachmarks</span>)
  439             </div>
  440     
  441             <ul class="parameters">
  442                     <li>
  443                 <span class="var-type">array</span>
  444                 <span class="var-name">$retain_benachmarks</span><span class="var-description">: Optional. Numeric array containing benchmark-identifiers that should NOT get resetted.</span>          </li>
  445                     <li>
  446                 <span class="var-type"></span>
  447                 <span class="var-name">$retain_benchmarks</span>            </li>
  448                 </ul>
  449         
  450             
  451     </div>
  452 <a name="methodstart" id="start"><!-- --></a>
  453 <div class="oddrow">
  454     
  455     <div class="method-header">
  456         <span class="method-title">static method start</span> (line <span class="line-number">30</span>)
  457     </div> 
  458     
  459     <!-- ========== Info from phpDoc block ========= -->
  460 <p class="short-description">Starts the clock for the given benchmark.</p>
  461     <ul class="tags">
  462                 <li><span class="field">access:</span> public</li>
  463             </ul>
  464     
  465     <div class="method-signature">
  466         static
  467         <span class="method-result">void</span>
  468         <span class="method-name">
  469             start
  470         </span>
  471                     (<span class="var-type"></span>&nbsp;<span class="var-name">$identifier</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$temporary_benchmark</span> = <span class="var-default">false</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$identifie</span>)
  472             </div>
  473     
  474             <ul class="parameters">
  475                     <li>
  476                 <span class="var-type">string</span>
  477                 <span class="var-name">$identifie</span><span class="var-description">: The benchmark name/identifier.</span>           </li>
  478                     <li>
  479                 <span class="var-type">bool</span>
  480                 <span class="var-name">$temporary_benchmark</span><span class="var-description">: If set to TRUE, the benchmark will not be returned by methods                                     like getAllBenchmarks() and printAllBenchmarks()</span>         </li>
  481                     <li>
  482                 <span class="var-type"></span>
  483                 <span class="var-name">$identifier</span>           </li>
  484                 </ul>
  485         
  486             
  487     </div>
  488 <a name="methodstop" id="stop"><!-- --></a>
  489 <div class="evenrow">
  490     
  491     <div class="method-header">
  492         <span class="method-title">static method stop</span> (line <span class="line-number">54</span>)
  493     </div> 
  494     
  495     <!-- ========== Info from phpDoc block ========= -->
  496 <p class="short-description">Stops the benchmark-clock for the given benchmark.</p>
  497     <ul class="tags">
  498                 <li><span class="field">access:</span> public</li>
  499             </ul>
  500     
  501     <div class="method-signature">
  502         static
  503         <span class="method-result">void</span>
  504         <span class="method-name">
  505             stop
  506         </span>
  507                     (<span class="var-type">string</span>&nbsp;<span class="var-name">$identifier</span>)
  508             </div>
  509     
  510             <ul class="parameters">
  511                     <li>
  512                 <span class="var-type">string</span>
  513                 <span class="var-name">$identifier</span><span class="var-description">: The benchmark name/identifier.</span>          </li>
  514                 </ul>
  515         
  516             
  517     </div>
  518 
  519                         
  520         </div>
  521     </div>
  522 
  523 
  524     <p class="notes" id="credit">
  525         Documentation generated on Sun, 20 Jan 2013 21:18:50 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
  526     </p>
  527     </div></body>
  528 </html>