[svn] commit: r666 - /branches/parkinglot/src/bin/stats/statsd.py
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jan 29 23:24:30 UTC 2010
Author: fujiwara
Date: Fri Jan 29 23:24:29 2010
New Revision: 666
Log:
added debug message
Modified:
branches/parkinglot/src/bin/stats/statsd.py
Modified: branches/parkinglot/src/bin/stats/statsd.py
==============================================================================
--- branches/parkinglot/src/bin/stats/statsd.py (original)
+++ branches/parkinglot/src/bin/stats/statsd.py Fri Jan 29 23:24:29 2010
@@ -10,6 +10,7 @@
bossgroup = 'Boss'
myname = 'statsd'
+debug = 1
def total(s):
def totalsub(d,s):
@@ -103,7 +104,8 @@
def collector(statgroup,step,statpath,statcount):
cc = ISC.CC.Session()
- print (cc.lname)
+ if debug:
+ print ("cc.lname=",cc.lname)
cc.group_subscribe(statgroup)
cc.group_subscribe(bossgroup, myname)
wrote_time = -1
@@ -114,6 +116,8 @@
while 1:
wait = wrote_time + step - time.time()
if wait <= 0 and last_recvd_time > wrote_time:
+ if debug:
+ print ("dump stats")
dump_stats(statpath, statcount, statstotal, stats)
last_wrote_time = wrote_time;
wrote_time = time.time();
@@ -135,6 +139,8 @@
component = data['component']
_from = envelope['from']
data['from'] = _from
+ if debug:
+ print ("received from ",_from)
if (not (component in stats)):
stats[component] = {}
(stats[component])[_from] = data;
More information about the bind10-changes
mailing list