[Zodb-checkins] CVS: ZODB3/ZODB - ActivityMonitor.py:1.3.8.1
Guido van Rossum
guido@python.org
Wed, 16 Oct 2002 18:05:49 -0400
Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv6095
Modified Files:
Tag: ZODB3-3_1-branch
ActivityMonitor.py
Log Message:
Merge from trunk: Shane's changes to show #connections.
=== ZODB3/ZODB/ActivityMonitor.py 1.3 => 1.3.8.1 ===
--- ZODB3/ZODB/ActivityMonitor.py:1.3 Wed Aug 14 18:07:09 2002
+++ ZODB3/ZODB/ActivityMonitor.py Wed Oct 16 18:05:49 2002
@@ -72,12 +72,14 @@
'end': start + (end - start) * (n + 1) / divisions,
'loads': 0,
'stores': 0,
+ 'connections': 0,
})
div = res[0]
div_start = div['start']
div_end = div['end']
div_index = 0
+ connections = 0
total_loads = 0
total_stores = 0
for t, loads, stores in self.log:
@@ -90,17 +92,21 @@
while t > div_end:
div['loads'] = total_loads
div['stores'] = total_stores
+ div['connections'] = connections
total_loads = 0
total_stores = 0
+ connections = 0
div_index = div_index + 1
if div_index < divisions:
div = res[div_index]
div_start = div['start']
div_end = div['end']
+ connections = connections + 1
total_loads = total_loads + loads
total_stores = total_stores + stores
div['stores'] = div['stores'] + total_stores
div['loads'] = div['loads'] + total_loads
+ div['connections'] = div['connections'] + connections
return res