Update version according to OSCI-883
[packages/precise/mcollective.git] / doc / MCollective / RunnerStats.html
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head>
6         <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
8         <title>Class: MCollective::RunnerStats</title>
9
10         <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
12         <script src="../js/jquery.js" type="text/javascript"
13                 charset="utf-8"></script>
14         <script src="../js/thickbox-compressed.js" type="text/javascript"
15                 charset="utf-8"></script>
16         <script src="../js/quicksearch.js" type="text/javascript"
17                 charset="utf-8"></script>
18         <script src="../js/darkfish.js" type="text/javascript"
19                 charset="utf-8"></script>
20
21 </head>
22 <body class="class">
23
24         <div id="metadata">
25                 <div id="file-metadata">
26                         <div id="file-list-section" class="section">
27                                 <h3 class="section-header">In Files</h3>
28                                 <div class="section-body">
29                                         <ul>
30                                         
31                                                 <li><a href="../lib/mcollective/runnerstats_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32                                                         class="thickbox" title="lib/mcollective/runnerstats.rb">lib/mcollective/runnerstats.rb</a></li>
33                                         
34                                         </ul>
35                                 </div>
36                         </div>
37
38                         
39                 </div>
40
41                 <div id="class-metadata">
42
43                         <!-- Parent Class -->
44                         
45                         <div id="parent-class-section" class="section">
46                                 <h3 class="section-header">Parent</h3>
47                                 
48                                 <p class="link"><a href="../Object.html">Object</a></p>
49                                 
50                         </div>
51                         
52
53                         <!-- Namespace Contents -->
54                         
55
56                         <!-- Method Quickref -->
57                         
58                         <div id="method-list-section" class="section">
59                                 <h3 class="section-header">Methods</h3>
60                                 <ul class="link-list">
61                                         
62                                         <li><a href="#M000225">::new</a></li>
63                                         
64                                         <li><a href="#M000228">#filtered</a></li>
65                                         
66                                         <li><a href="#M000227">#passed</a></li>
67                                         
68                                         <li><a href="#M000231">#received</a></li>
69                                         
70                                         <li><a href="#M000232">#sent</a></li>
71                                         
72                                         <li><a href="#M000233">#to_hash</a></li>
73                                         
74                                         <li><a href="#M000226">#ttlexpired</a></li>
75                                         
76                                         <li><a href="#M000230">#unvalidated</a></li>
77                                         
78                                         <li><a href="#M000229">#validated</a></li>
79                                         
80                                 </ul>
81                         </div>
82                         
83
84                         <!-- Included Modules -->
85                         
86                 </div>
87
88                 <div id="project-metadata">
89                         
90                         
91                         <div id="fileindex-section" class="section project-section">
92                                 <h3 class="section-header">Files</h3>
93                                 <ul>
94                                 
95                                         <li class="file"><a href="../COPYING.html">COPYING</a></li>
96                                 
97                                         <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
98                                 
99                                         <li class="file"><a href="../README.html">README</a></li>
100                                 
101                                         <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
102                                 
103                                         <li class="file"><a href="../etc/client_cfg_dist.html">client.cfg.dist</a></li>
104                                 
105                                         <li class="file"><a href="../etc/data-help_erb.html">data-help.erb</a></li>
106                                 
107                                         <li class="file"><a href="../etc/discovery-help_erb.html">discovery-help.erb</a></li>
108                                 
109                                         <li class="file"><a href="../etc/facts_yaml_dist.html">facts.yaml.dist</a></li>
110                                 
111                                         <li class="file"><a href="../etc/metadata-help_erb.html">metadata-help.erb</a></li>
112                                 
113                                         <li class="file"><a href="../etc/msg-help_erb.html">msg-help.erb</a></li>
114                                 
115                                         <li class="file"><a href="../etc/rpc-help_erb.html">rpc-help.erb</a></li>
116                                 
117                                         <li class="file"><a href="../etc/server_cfg_dist.html">server.cfg.dist</a></li>
118                                 
119                                         <li class="file"><a href="../etc/ssl/PLACEHOLDER.html">PLACEHOLDER</a></li>
120                                 
121                                         <li class="file"><a href="../etc/ssl/clients/PLACEHOLDER.html">PLACEHOLDER</a></li>
122                                 
123                                         <li class="file"><a href="../lib/mcollective/generators/templates/action_snippet_erb.html">action_snippet.erb</a></li>
124                                 
125                                         <li class="file"><a href="../lib/mcollective/generators/templates/data_input_snippet_erb.html">data_input_snippet.erb</a></li>
126                                 
127                                         <li class="file"><a href="../lib/mcollective/generators/templates/ddl_erb.html">ddl.erb</a></li>
128                                 
129                                         <li class="file"><a href="../lib/mcollective/generators/templates/plugin_erb.html">plugin.erb</a></li>
130                                 
131                                         <li class="file"><a href="../lib/mcollective/locales/en_yml.html">en.yml</a></li>
132                                 
133                                         <li class="file"><a href="../mcollective_init.html">mcollective.init</a></li>
134                                 
135                                 </ul>
136                         </div>
137                         
138
139                         <div id="classindex-section" class="section project-section">
140                                 <h3 class="section-header">Class Index
141                                         <span class="search-toggle"><img src="../images/find.png"
142                                                 height="16" width="16" alt="[+]"
143                                                 title="show/hide quicksearch" /></span></h3>
144                                 <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
145                                 <fieldset>
146                                         <legend>Quicksearch</legend>
147                                         <input type="text" name="quicksearch" value=""
148                                                 class="quicksearch-field" />
149                                 </fieldset>
150                                 </form>
151
152                                 <ul class="link-list">
153                                 
154                                         <li><a href="../MCollective.html">MCollective</a></li>
155                                 
156                                         <li><a href="../MCollective/Agent.html">MCollective::Agent</a></li>
157                                 
158                                         <li><a href="../MCollective/Agents.html">MCollective::Agents</a></li>
159                                 
160                                         <li><a href="../MCollective/Aggregate.html">MCollective::Aggregate</a></li>
161                                 
162                                         <li><a href="../MCollective/Aggregate/Base.html">MCollective::Aggregate::Base</a></li>
163                                 
164                                         <li><a href="../MCollective/Aggregate/Result.html">MCollective::Aggregate::Result</a></li>
165                                 
166                                         <li><a href="../MCollective/Aggregate/Result/Base.html">MCollective::Aggregate::Result::Base</a></li>
167                                 
168                                         <li><a href="../MCollective/Aggregate/Result/CollectionResult.html">MCollective::Aggregate::Result::CollectionResult</a></li>
169                                 
170                                         <li><a href="../MCollective/Aggregate/Result/NumericResult.html">MCollective::Aggregate::Result::NumericResult</a></li>
171                                 
172                                         <li><a href="../MCollective/Application.html">MCollective::Application</a></li>
173                                 
174                                         <li><a href="../MCollective/Applications.html">MCollective::Applications</a></li>
175                                 
176                                         <li><a href="../MCollective/Cache.html">MCollective::Cache</a></li>
177                                 
178                                         <li><a href="../MCollective/Client.html">MCollective::Client</a></li>
179                                 
180                                         <li><a href="../MCollective/CodedError.html">MCollective::CodedError</a></li>
181                                 
182                                         <li><a href="../MCollective/Config.html">MCollective::Config</a></li>
183                                 
184                                         <li><a href="../MCollective/Connector.html">MCollective::Connector</a></li>
185                                 
186                                         <li><a href="../MCollective/Connector/Base.html">MCollective::Connector::Base</a></li>
187                                 
188                                         <li><a href="../MCollective/DDL.html">MCollective::DDL</a></li>
189                                 
190                                         <li><a href="../MCollective/DDL/AgentDDL.html">MCollective::DDL::AgentDDL</a></li>
191                                 
192                                         <li><a href="../MCollective/DDL/Base.html">MCollective::DDL::Base</a></li>
193                                 
194                                         <li><a href="../MCollective/DDL/DataDDL.html">MCollective::DDL::DataDDL</a></li>
195                                 
196                                         <li><a href="../MCollective/DDL/DiscoveryDDL.html">MCollective::DDL::DiscoveryDDL</a></li>
197                                 
198                                         <li><a href="../MCollective/DDL/ValidatorDDL.html">MCollective::DDL::ValidatorDDL</a></li>
199                                 
200                                         <li><a href="../MCollective/DDLValidationError.html">MCollective::DDLValidationError</a></li>
201                                 
202                                         <li><a href="../MCollective/Data.html">MCollective::Data</a></li>
203                                 
204                                         <li><a href="../MCollective/Data/Base.html">MCollective::Data::Base</a></li>
205                                 
206                                         <li><a href="../MCollective/Data/Result.html">MCollective::Data::Result</a></li>
207                                 
208                                         <li><a href="../MCollective/Discovery.html">MCollective::Discovery</a></li>
209                                 
210                                         <li><a href="../MCollective/Facts.html">MCollective::Facts</a></li>
211                                 
212                                         <li><a href="../MCollective/Facts/Base.html">MCollective::Facts::Base</a></li>
213                                 
214                                         <li><a href="../MCollective/Generators.html">MCollective::Generators</a></li>
215                                 
216                                         <li><a href="../MCollective/Generators/AgentGenerator.html">MCollective::Generators::AgentGenerator</a></li>
217                                 
218                                         <li><a href="../MCollective/Generators/Base.html">MCollective::Generators::Base</a></li>
219                                 
220                                         <li><a href="../MCollective/Generators/DataGenerator.html">MCollective::Generators::DataGenerator</a></li>
221                                 
222                                         <li><a href="../MCollective/InvalidRPCData.html">MCollective::InvalidRPCData</a></li>
223                                 
224                                         <li><a href="../MCollective/Log.html">MCollective::Log</a></li>
225                                 
226                                         <li><a href="../MCollective/Logger.html">MCollective::Logger</a></li>
227                                 
228                                         <li><a href="../MCollective/Logger/Base.html">MCollective::Logger::Base</a></li>
229                                 
230                                         <li><a href="../MCollective/Logger/Console_logger.html">MCollective::Logger::Console_logger</a></li>
231                                 
232                                         <li><a href="../MCollective/Logger/File_logger.html">MCollective::Logger::File_logger</a></li>
233                                 
234                                         <li><a href="../MCollective/Logger/Syslog_logger.html">MCollective::Logger::Syslog_logger</a></li>
235                                 
236                                         <li><a href="../MCollective/Matcher.html">MCollective::Matcher</a></li>
237                                 
238                                         <li><a href="../MCollective/Matcher/Parser.html">MCollective::Matcher::Parser</a></li>
239                                 
240                                         <li><a href="../MCollective/Matcher/Scanner.html">MCollective::Matcher::Scanner</a></li>
241                                 
242                                         <li><a href="../MCollective/Message.html">MCollective::Message</a></li>
243                                 
244                                         <li><a href="../MCollective/MissingRPCData.html">MCollective::MissingRPCData</a></li>
245                                 
246                                         <li><a href="../MCollective/MsgDoesNotMatchRequestID.html">MCollective::MsgDoesNotMatchRequestID</a></li>
247                                 
248                                         <li><a href="../MCollective/MsgTTLExpired.html">MCollective::MsgTTLExpired</a></li>
249                                 
250                                         <li><a href="../MCollective/NotTargettedAtUs.html">MCollective::NotTargettedAtUs</a></li>
251                                 
252                                         <li><a href="../MCollective/Optionparser.html">MCollective::Optionparser</a></li>
253                                 
254                                         <li><a href="../MCollective/PluginManager.html">MCollective::PluginManager</a></li>
255                                 
256                                         <li><a href="../MCollective/PluginPackager.html">MCollective::PluginPackager</a></li>
257                                 
258                                         <li><a href="../MCollective/PluginPackager/AgentDefinition.html">MCollective::PluginPackager::AgentDefinition</a></li>
259                                 
260                                         <li><a href="../MCollective/PluginPackager/StandardDefinition.html">MCollective::PluginPackager::StandardDefinition</a></li>
261                                 
262                                         <li><a href="../MCollective/RPC.html">MCollective::RPC</a></li>
263                                 
264                                         <li><a href="../MCollective/RPC/ActionRunner.html">MCollective::RPC::ActionRunner</a></li>
265                                 
266                                         <li><a href="../MCollective/RPC/Agent.html">MCollective::RPC::Agent</a></li>
267                                 
268                                         <li><a href="../MCollective/RPC/Audit.html">MCollective::RPC::Audit</a></li>
269                                 
270                                         <li><a href="../MCollective/RPC/Client.html">MCollective::RPC::Client</a></li>
271                                 
272                                         <li><a href="../MCollective/RPC/Helpers.html">MCollective::RPC::Helpers</a></li>
273                                 
274                                         <li><a href="../MCollective/RPC/Progress.html">MCollective::RPC::Progress</a></li>
275                                 
276                                         <li><a href="../MCollective/RPC/Reply.html">MCollective::RPC::Reply</a></li>
277                                 
278                                         <li><a href="../MCollective/RPC/Request.html">MCollective::RPC::Request</a></li>
279                                 
280                                         <li><a href="../MCollective/RPC/Result.html">MCollective::RPC::Result</a></li>
281                                 
282                                         <li><a href="../MCollective/RPC/Stats.html">MCollective::RPC::Stats</a></li>
283                                 
284                                         <li><a href="../MCollective/RPCAborted.html">MCollective::RPCAborted</a></li>
285                                 
286                                         <li><a href="../MCollective/RPCError.html">MCollective::RPCError</a></li>
287                                 
288                                         <li><a href="../MCollective/Registration.html">MCollective::Registration</a></li>
289                                 
290                                         <li><a href="../MCollective/Registration/Base.html">MCollective::Registration::Base</a></li>
291                                 
292                                         <li><a href="../MCollective/Runner.html">MCollective::Runner</a></li>
293                                 
294                                         <li><a href="../MCollective/RunnerStats.html">MCollective::RunnerStats</a></li>
295                                 
296                                         <li><a href="../MCollective/SSL.html">MCollective::SSL</a></li>
297                                 
298                                         <li><a href="../MCollective/Security.html">MCollective::Security</a></li>
299                                 
300                                         <li><a href="../MCollective/Security/Base.html">MCollective::Security::Base</a></li>
301                                 
302                                         <li><a href="../MCollective/SecurityValidationFailed.html">MCollective::SecurityValidationFailed</a></li>
303                                 
304                                         <li><a href="../MCollective/Shell.html">MCollective::Shell</a></li>
305                                 
306                                         <li><a href="../MCollective/Translatable.html">MCollective::Translatable</a></li>
307                                 
308                                         <li><a href="../MCollective/UnixDaemon.html">MCollective::UnixDaemon</a></li>
309                                 
310                                         <li><a href="../MCollective/UnknownRPCAction.html">MCollective::UnknownRPCAction</a></li>
311                                 
312                                         <li><a href="../MCollective/UnknownRPCError.html">MCollective::UnknownRPCError</a></li>
313                                 
314                                         <li><a href="../MCollective/Util.html">MCollective::Util</a></li>
315                                 
316                                         <li><a href="../MCollective/Validator.html">MCollective::Validator</a></li>
317                                 
318                                         <li><a href="../MCollective/ValidatorError.html">MCollective::ValidatorError</a></li>
319                                 
320                                         <li><a href="../MCollective/WindowsDaemon.html">MCollective::WindowsDaemon</a></li>
321                                 
322                                         <li><a href="../Array.html">Array</a></li>
323                                 
324                                         <li><a href="../Dir.html">Dir</a></li>
325                                 
326                                         <li><a href="../Object.html">Object</a></li>
327                                 
328                                         <li><a href="../String.html">String</a></li>
329                                 
330                                         <li><a href="../Symbol.html">Symbol</a></li>
331                                 
332                                 </ul>
333                                 <div id="no-class-search-results" style="display: none;">No matching classes.</div>
334                         </div>
335
336                         
337                 </div>
338         </div>
339
340         <div id="documentation">
341                 <h1 class="class">MCollective::RunnerStats</h1>
342
343                 <div id="description">
344                         <p>
345 Class to store stats about the mcollectived, it should live in the <a
346 href="PluginManager.html">PluginManager</a> so that agents etc can get hold
347 of it and return the stats to callers
348 </p>
349
350                 </div>
351
352                 <!-- Constants -->
353                 
354
355                 <!-- Attributes -->
356                 
357
358                 <!-- Methods -->
359                 
360                 <div id="public-class-method-details" class="method-section section">
361                         <h3 class="section-header">Public Class Methods</h3>
362
363                 
364                         <div id="new-method" class="method-detail ">
365                                 <a name="M000225"></a>
366
367                                 <div class="method-heading">
368                                 
369                                         <span class="method-name">new</span><span
370                                                 class="method-args">()</span>
371                                         <span class="method-click-advice">click to toggle source</span>
372                                 
373                                 </div>
374
375                                 <div class="method-description">
376                                         
377                                         <p class="missing-docs">(Not documented)</p>
378                                         
379
380                                         
381                                         <div class="method-source-code"
382                                                 id="new-source">
383 <pre>
384     <span class="ruby-comment cmt"># File lib/mcollective/runnerstats.rb, line 5</span>
385  5:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
386  6:       <span class="ruby-ivar">@starttime</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">to_i</span>
387  7:       <span class="ruby-ivar">@validated</span> = <span class="ruby-value">0</span>
388  8:       <span class="ruby-ivar">@unvalidated</span> = <span class="ruby-value">0</span>
389  9:       <span class="ruby-ivar">@filtered</span> = <span class="ruby-value">0</span>
390 10:       <span class="ruby-ivar">@passed</span> = <span class="ruby-value">0</span>
391 11:       <span class="ruby-ivar">@total</span> = <span class="ruby-value">0</span>
392 12:       <span class="ruby-ivar">@replies</span> = <span class="ruby-value">0</span>
393 13:       <span class="ruby-ivar">@ttlexpired</span> = <span class="ruby-value">0</span>
394 14: 
395 15:       <span class="ruby-ivar">@mutex</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>
396 16:     <span class="ruby-keyword kw">end</span></pre>
397                                         </div>
398                                         
399                                 </div>
400
401                                 
402                         </div>
403
404                 
405                 </div>
406         
407                 <div id="public-instance-method-details" class="method-section section">
408                         <h3 class="section-header">Public Instance Methods</h3>
409
410                 
411                         <div id="filtered-method" class="method-detail ">
412                                 <a name="M000228"></a>
413
414                                 <div class="method-heading">
415                                 
416                                         <span class="method-name">filtered</span><span
417                                                 class="method-args">()</span>
418                                         <span class="method-click-advice">click to toggle source</span>
419                                 
420                                 </div>
421
422                                 <div class="method-description">
423                                         
424                                         <p>
425 Records a message that didnt pass the filters
426 </p>
427                                         
428
429                                         
430                                         <div class="method-source-code"
431                                                 id="filtered-source">
432 <pre>
433     <span class="ruby-comment cmt"># File lib/mcollective/runnerstats.rb, line 31</span>
434 31:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">filtered</span>
435 32:       <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;Incrementing filtered stat&quot;</span>)
436 33:       <span class="ruby-ivar">@filtered</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
437 34:     <span class="ruby-keyword kw">end</span></pre>
438                                         </div>
439                                         
440                                 </div>
441
442                                 
443                         </div>
444
445                 
446                         <div id="passed-method" class="method-detail ">
447                                 <a name="M000227"></a>
448
449                                 <div class="method-heading">
450                                 
451                                         <span class="method-name">passed</span><span
452                                                 class="method-args">()</span>
453                                         <span class="method-click-advice">click to toggle source</span>
454                                 
455                                 </div>
456
457                                 <div class="method-description">
458                                         
459                                         <p>
460 Records a message that passed the filters
461 </p>
462                                         
463
464                                         
465                                         <div class="method-source-code"
466                                                 id="passed-source">
467 <pre>
468     <span class="ruby-comment cmt"># File lib/mcollective/runnerstats.rb, line 25</span>
469 25:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">passed</span>
470 26:       <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;Incrementing passed stat&quot;</span>)
471 27:       <span class="ruby-ivar">@passed</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
472 28:     <span class="ruby-keyword kw">end</span></pre>
473                                         </div>
474                                         
475                                 </div>
476
477                                 
478                         </div>
479
480                 
481                         <div id="received-method" class="method-detail ">
482                                 <a name="M000231"></a>
483
484                                 <div class="method-heading">
485                                 
486                                         <span class="method-name">received</span><span
487                                                 class="method-args">()</span>
488                                         <span class="method-click-advice">click to toggle source</span>
489                                 
490                                 </div>
491
492                                 <div class="method-description">
493                                         
494                                         <p>
495 Records receipt of a message
496 </p>
497                                         
498
499                                         
500                                         <div class="method-source-code"
501                                                 id="received-source">
502 <pre>
503     <span class="ruby-comment cmt"># File lib/mcollective/runnerstats.rb, line 48</span>
504 48:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">received</span>
505 49:       <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;Incrementing total stat&quot;</span>)
506 50:       <span class="ruby-ivar">@total</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
507 51:     <span class="ruby-keyword kw">end</span></pre>
508                                         </div>
509                                         
510                                 </div>
511
512                                 
513                         </div>
514
515                 
516                         <div id="sent-method" class="method-detail ">
517                                 <a name="M000232"></a>
518
519                                 <div class="method-heading">
520                                 
521                                         <span class="method-name">sent</span><span
522                                                 class="method-args">()</span>
523                                         <span class="method-click-advice">click to toggle source</span>
524                                 
525                                 </div>
526
527                                 <div class="method-description">
528                                         
529                                         <p>
530 Records sending a message
531 </p>
532                                         
533
534                                         
535                                         <div class="method-source-code"
536                                                 id="sent-source">
537 <pre>
538     <span class="ruby-comment cmt"># File lib/mcollective/runnerstats.rb, line 54</span>
539 54:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sent</span>
540 55:       <span class="ruby-ivar">@mutex</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword kw">do</span>
541 56:         <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;Incrementing replies stat&quot;</span>)
542 57:         <span class="ruby-ivar">@replies</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
543 58:       <span class="ruby-keyword kw">end</span>
544 59:     <span class="ruby-keyword kw">end</span></pre>
545                                         </div>
546                                         
547                                 </div>
548
549                                 
550                         </div>
551
552                 
553                         <div id="to-hash-method" class="method-detail ">
554                                 <a name="M000233"></a>
555
556                                 <div class="method-heading">
557                                 
558                                         <span class="method-name">to_hash</span><span
559                                                 class="method-args">()</span>
560                                         <span class="method-click-advice">click to toggle source</span>
561                                 
562                                 </div>
563
564                                 <div class="method-description">
565                                         
566                                         <p>
567 Returns a hash with all stats
568 </p>
569                                         
570
571                                         
572                                         <div class="method-source-code"
573                                                 id="to-hash-source">
574 <pre>
575     <span class="ruby-comment cmt"># File lib/mcollective/runnerstats.rb, line 62</span>
576 62:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_hash</span>
577 63:       <span class="ruby-identifier">stats</span> = {<span class="ruby-identifier">:validated</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@validated</span>,
578 64:         <span class="ruby-identifier">:unvalidated</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@unvalidated</span>,
579 65:         <span class="ruby-identifier">:passed</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@passed</span>,
580 66:         <span class="ruby-identifier">:filtered</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@filtered</span>,
581 67:         <span class="ruby-identifier">:starttime</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@starttime</span>,
582 68:         <span class="ruby-identifier">:total</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@total</span>,
583 69:         <span class="ruby-identifier">:ttlexpired</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@ttlexpired</span>,
584 70:         <span class="ruby-identifier">:replies</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@replies</span>}
585 71: 
586 72:       <span class="ruby-identifier">reply</span> = {<span class="ruby-identifier">:stats</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">stats</span>,
587 73:         <span class="ruby-identifier">:threads</span> =<span class="ruby-operator">&gt;</span> [],
588 74:         <span class="ruby-identifier">:pid</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Process</span>.<span class="ruby-identifier">pid</span>,
589 75:         <span class="ruby-identifier">:times</span> =<span class="ruby-operator">&gt;</span> {} }
590 76: 
591 77:       <span class="ruby-operator">::</span><span class="ruby-constant">Process</span>.<span class="ruby-identifier">times</span>.<span class="ruby-identifier">each_pair</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
592 78:         <span class="ruby-identifier">k</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>
593 79:         <span class="ruby-identifier">reply</span>[<span class="ruby-identifier">:times</span>][<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>
594 80:       }
595 81: 
596 82:       <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
597 83:         <span class="ruby-identifier">reply</span>[<span class="ruby-identifier">:threads</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{t.inspect}&quot;</span>
598 84:       <span class="ruby-keyword kw">end</span>
599 85: 
600 86:       <span class="ruby-identifier">reply</span>[<span class="ruby-identifier">:agents</span>] = <span class="ruby-constant">Agents</span>.<span class="ruby-identifier">agentlist</span>
601 87:       <span class="ruby-identifier">reply</span>
602 88:     <span class="ruby-keyword kw">end</span></pre>
603                                         </div>
604                                         
605                                 </div>
606
607                                 
608                         </div>
609
610                 
611                         <div id="ttlexpired-method" class="method-detail ">
612                                 <a name="M000226"></a>
613
614                                 <div class="method-heading">
615                                 
616                                         <span class="method-name">ttlexpired</span><span
617                                                 class="method-args">()</span>
618                                         <span class="method-click-advice">click to toggle source</span>
619                                 
620                                 </div>
621
622                                 <div class="method-description">
623                                         
624                                         <p>
625 Records a message that failed TTL checks
626 </p>
627                                         
628
629                                         
630                                         <div class="method-source-code"
631                                                 id="ttlexpired-source">
632 <pre>
633     <span class="ruby-comment cmt"># File lib/mcollective/runnerstats.rb, line 19</span>
634 19:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ttlexpired</span>
635 20:       <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;Incrementing ttl expired stat&quot;</span>)
636 21:       <span class="ruby-ivar">@ttlexpired</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
637 22:     <span class="ruby-keyword kw">end</span></pre>
638                                         </div>
639                                         
640                                 </div>
641
642                                 
643                         </div>
644
645                 
646                         <div id="unvalidated-method" class="method-detail ">
647                                 <a name="M000230"></a>
648
649                                 <div class="method-heading">
650                                 
651                                         <span class="method-name">unvalidated</span><span
652                                                 class="method-args">()</span>
653                                         <span class="method-click-advice">click to toggle source</span>
654                                 
655                                 </div>
656
657                                 <div class="method-description">
658                                         
659                                         <p class="missing-docs">(Not documented)</p>
660                                         
661
662                                         
663                                         <div class="method-source-code"
664                                                 id="unvalidated-source">
665 <pre>
666     <span class="ruby-comment cmt"># File lib/mcollective/runnerstats.rb, line 42</span>
667 42:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unvalidated</span>
668 43:       <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;Incrementing unvalidated stat&quot;</span>)
669 44:       <span class="ruby-ivar">@unvalidated</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
670 45:     <span class="ruby-keyword kw">end</span></pre>
671                                         </div>
672                                         
673                                 </div>
674
675                                 
676                         </div>
677
678                 
679                         <div id="validated-method" class="method-detail ">
680                                 <a name="M000229"></a>
681
682                                 <div class="method-heading">
683                                 
684                                         <span class="method-name">validated</span><span
685                                                 class="method-args">()</span>
686                                         <span class="method-click-advice">click to toggle source</span>
687                                 
688                                 </div>
689
690                                 <div class="method-description">
691                                         
692                                         <p>
693 Records a message that validated ok
694 </p>
695                                         
696
697                                         
698                                         <div class="method-source-code"
699                                                 id="validated-source">
700 <pre>
701     <span class="ruby-comment cmt"># File lib/mcollective/runnerstats.rb, line 37</span>
702 37:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validated</span>
703 38:       <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span>(<span class="ruby-value str">&quot;Incrementing validated stat&quot;</span>)
704 39:       <span class="ruby-ivar">@validated</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
705 40:     <span class="ruby-keyword kw">end</span></pre>
706                                         </div>
707                                         
708                                 </div>
709
710                                 
711                         </div>
712
713                 
714                 </div>
715         
716
717         </div>
718
719
720         <div id="rdoc-debugging-section-dump" class="debugging-section">
721         
722                 <p>Disabled; run with --debug to generate this.</p>
723         
724         </div>
725
726         <div id="validator-badges">
727                 <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
728                 <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
729                         Rdoc Generator</a> 1.1.6</small>.</p>
730         </div>
731
732 </body>
733 </html>
734