Browse Source

[2225_statistics] update counter class names in docstring

Naoki Kambe 12 years ago
parent
commit
7dee66ffe8
1 changed files with 12 additions and 14 deletions
  1. 12 14
      src/lib/python/isc/statistics/counter.py

+ 12 - 14
src/lib/python/isc/statistics/counter.py

@@ -20,36 +20,35 @@ using the module `counter.py`, firstly the init() method should be
 invoked in each module like b10-xfrin or b10-xfrout after importing
 invoked in each module like b10-xfrin or b10-xfrout after importing
 this module.
 this module.
 
 
-  import counter
-  counter.init(SPECFILE_LOCATION)
+  from isc.statistics import Counter
+  Counter.init(SPECFILE_LOCATION)
 
 
-The first argument of counter.init() is required, which is the
+The first argument of Counter.init() is required, which is the
 location of the specification file like src/bin/xfrout/xfrout.spec. If
 location of the specification file like src/bin/xfrout/xfrout.spec. If
 this initial preparation is done, statistics counters can be accessed
 this initial preparation is done, statistics counters can be accessed
 from each module. For example, in case that the item `xfrreqdone` is
 from each module. For example, in case that the item `xfrreqdone` is
 defined in statistics_spec in xfrout.spec, the following methods can
 defined in statistics_spec in xfrout.spec, the following methods can
-be dynamically created: counter.inc_xfrreqdone(),
-counter.get_xfrreqdone(). Since these methods requires the string of
+be dynamically created: Counter.inc_xfrreqdone(),
+Counter.get_xfrreqdone(). Since these methods requires the string of
 the zone name in the first argument, in the b10-xfrout,
 the zone name in the first argument, in the b10-xfrout,
 
 
-  counter.inc_xfrreqdone(zone_name)
+  Counter.inc_xfrreqdone(zone_name)
 
 
 then the xfrreqdone counter corresponding to zone_name was
 then the xfrreqdone counter corresponding to zone_name was
 incremented. For getting the current number of this counter, we can do
 incremented. For getting the current number of this counter, we can do
 this,
 this,
 
 
-  number = counter.get_xfrreqdone(zone_name)
+  number = Counter.get_xfrreqdone(zone_name)
 
 
 then the current number was obtained and set in the above variable
 then the current number was obtained and set in the above variable
 `number`. Such a getter method would be mainly used for unittesting.
 `number`. Such a getter method would be mainly used for unittesting.
-These dynamic accessor are defined in detail in the concrete class
-XfroutCounter. In other example, regarding the item `axfr_running`,
+In other example, regarding the item `axfr_running`,
 the decrementer method is also created:
 the decrementer method is also created:
-counter.dec_axfr_running(). This method is used for decrementing the
+Counter.dec_axfr_running(). This method is used for decrementing the
 counter number.  Regarding the item `axfr_running`, an argument like
 counter number.  Regarding the item `axfr_running`, an argument like
 zone name is not required.
 zone name is not required.
 
 
-  counter.dec_axfr_running()
+  Counter.dec_axfr_running()
 
 
 These accessors are effective in other module. For example, in case
 These accessors are effective in other module. For example, in case
 that this module `counter.py` is once imported in such a main module
 that this module `counter.py` is once imported in such a main module
@@ -57,7 +56,7 @@ as b10-xfrout, Regarding the item `notifyoutv4`, the incrementer
 inc_notifyoutv4() can be invoked via other module like notify_out.py,
 inc_notifyoutv4() can be invoked via other module like notify_out.py,
 which is firstly imported in the main module.
 which is firstly imported in the main module.
 
 
-  counter.inc_notifyoutv4(zone_name)
+  Counter.inc_notifyoutv4(zone_name)
 
 
 In this example this is for incrementing the counter of the item
 In this example this is for incrementing the counter of the item
 notifyoutv4. Thus, such statement can be also written in the other
 notifyoutv4. Thus, such statement can be also written in the other
@@ -160,8 +159,7 @@ class Counter():
             setattr(Counter, k, v)
             setattr(Counter, k, v)
         return _COUNTER
         return _COUNTER
 
 
-    # These method are dummies for notify_out in case XfroutCounter is not
-    # loaded.
+    # These method are dummies for isc.notify.notify_out.
     def inc_notifyoutv4(arg):
     def inc_notifyoutv4(arg):
         """An empty method to be disclosed"""
         """An empty method to be disclosed"""
         pass
         pass