[Zodb-checkins] CVS: Zope/lib/python/ZODB - ActivityMonitor.py:1.3.6.1

Shane Hathaway shane@cvs.zope.org
Wed, 9 Oct 2002 11:26:27 -0400


Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv27526/ZODB

Modified Files:
      Tag: Zope-2_6-branch
	ActivityMonitor.py 
Log Message:
Merged from the head: in the database activity chart, display the number of
connections for each period in addition to the number of loads and stores.


=== Zope/lib/python/ZODB/ActivityMonitor.py 1.3 => 1.3.6.1 ===
--- Zope/lib/python/ZODB/ActivityMonitor.py:1.3	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/ActivityMonitor.py	Wed Oct  9 11:26:26 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