BIND 10 #191: Implement a initial version of stats
BIND 10 Development
do-not-reply at isc.org
Fri Aug 27 01:43:32 UTC 2010
#191: Implement a initial version of stats
-----------------------------+----------------------------------------------
Reporter: naokikambe | Owner: jinmei
Type: task | Status: reviewing
Priority: major | Milestone: y2 6 month milestone
Component: statistics | Resolution:
Keywords: | Sensitive: 0
Estimatedhours: 0.0 | Hours: 0.25
Billable: 0 | Totalhours: 3.08
Internal: 0 |
-----------------------------+----------------------------------------------
Changes (by jinmei):
* hours: 0.0 => 0.25
* totalhours: 3.08 => 3.33
Comment:
I also have some high level questions about the design of stats.py:
- I don't see the need for the abstraction using the observer pattern
because there is only type of listener (=observer). what's the background
rationle of this design decision? Please describe it in more detail in
the source code.
- Likewise, I was not sure about the intent of the seeming introduction
of singleton. From a very superficial look at the code the intent seems
to make SessionSubject a singleton class, but at least in the usage of
stats.py we don't have to bother to have such a tricky technique, because
there cannot be more than one SessionSubject object in the first place.
Besides, I suspect this implementation actually doesn't realize what is
seeminly intended:
{{{
class SessionSubject(Subject):
"""
A concrete subject class which creates CC session object
"""
__metaclass__ = Singleton
}}}
according to a python 2-to-3 guide, this syntax has been depreciated:
http://diveintopython3.org/porting-code-to-python-3-with-
2to3.html#metaclass
Please clarify the intent of the code in more detail.
--
Ticket URL: <http://bind10.isc.org/ticket/191#comment:12>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list