[Bio] / FigKernelPackages / Stats.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Stats.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Tue Feb 6 16:25:18 2007 UTC revision 1.3, Thu Dec 6 13:59:34 2007 UTC
# Line 23  Line 23 
23    
24  =head3 new  =head3 new
25    
26  C<< my $stats = Stats->new($name1, $name2, ... $nameN); >>      my $stats = Stats->new($name1, $name2, ... $nameN);
27    
28  This is the constructor for the statistical reporting object. It returns an object  This is the constructor for the statistical reporting object. It returns an object
29  with no messages and zero or more counters, all set to 0. Note that there is no  with no messages and zero or more counters, all set to 0. Note that there is no
30  need to prime the counters in this constructor, so  need to prime the counters in this constructor, so
31    
32  C<< my $stats = Stats->new(); >>      my $stats = Stats->new();
33    
34  is perfectly legal. In that case, the counters are created as they are needed. The advantage  is perfectly legal. In that case, the counters are created as they are needed. The advantage
35  to specifying names in the constructor is that they will appear on the output as having a  to specifying names in the constructor is that they will appear on the output as having a
# Line 61  Line 61 
61    
62  =head3 Add  =head3 Add
63    
64  C<< my $newValue = $stats->Add($name, $value); >>      my $newValue = $stats->Add($name, $value);
65    
66  Add the specified value to the counter with the specified name. If the counter does not  Add the specified value to the counter with the specified name. If the counter does not
67  exist, it will be created with a value of 0.  exist, it will be created with a value of 0.
# Line 106  Line 106 
106    
107  =head3 Accumulate  =head3 Accumulate
108    
109  C<< $stats->Accumulate($other); >>      $stats->Accumulate($other);
110    
111  Roll another statistics object's values into this object. The messages will be added to our message  Roll another statistics object's values into this object. The messages will be added to our message
112  list, and the values of the counters will be added together. If a counter exists only in this object,  list, and the values of the counters will be added together. If a counter exists only in this object,
# Line 138  Line 138 
138    
139  =head3 Ask  =head3 Ask
140    
141  C<< my $counter = $stats->Ask($name); >>      my $counter = $stats->Ask($name);
142    
143  Return the value of the named counter.  Return the value of the named counter.
144    
# Line 172  Line 172 
172    
173  =head3 AddMessage  =head3 AddMessage
174    
175  C<< $stats->AddMessage($text); >>      $stats->AddMessage($text);
176    
177  Add a message to the statistical object's message queue.  Add a message to the statistical object's message queue.
178    
# Line 206  Line 206 
206    
207  =head3 Show  =head3 Show
208    
209  C<< my $dataList = $stats->Show(); >>      my $dataList = $stats->Show();
210    
211  Display the statistics and messages in this object as a series of lines of text.  Display the statistics and messages in this object as a series of lines of text.
212    
# Line 234  Line 234 
234    
235  =head3 Display  =head3 Display
236    
237  C<< my $dataList = $stats->Display(); >>      my $dataList = $stats->Display();
238    
239  Display the statistics in this object as a single line of text.  Display the statistics in this object as a single line of text.
240    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3