Commit a62b6382 authored by Shane Hathaway's avatar Shane Hathaway

The database activity chart now shows the number of connections in a period

in addition to the loads and stores.
parent 4220173c
......@@ -13,8 +13,8 @@
__doc__='''Cache management support
$Id: CacheManager.py,v 1.26 2002/08/14 21:31:40 mj Exp $'''
__version__='$Revision: 1.26 $'[11:-2]
$Id: CacheManager.py,v 1.27 2002/10/09 15:11:25 shane Exp $'''
__version__='$Revision: 1.27 $'[11:-2]
import Globals, time, sys
from DateTime import DateTime
......@@ -295,11 +295,13 @@ class CacheManager:
total_load_count = 0
total_store_count = 0
total_connections = 0
limit = 0
divs = []
for div in analysis:
total_store_count = total_store_count + div['stores']
total_load_count = total_load_count + div['loads']
total_connections = total_connections + div['connections']
sum = div['stores'] + div['loads']
if sum > limit:
limit = sum
......@@ -340,6 +342,7 @@ class CacheManager:
'trans_len': max(segment_height - store_len - load_len, 0),
'store_count': div['stores'],
'load_count': div['loads'],
'connections': div['connections'],
'start': div['start'],
'end': div['end'],
'time_offset': time_offset,
......@@ -357,6 +360,7 @@ class CacheManager:
'divs': divs,
'total_store_count': total_store_count,
'total_load_count': total_load_count,
'total_connections': total_connections,
}
return res
......
......@@ -49,10 +49,10 @@
<tr>
<th align="left"><font color="#ff0000">Object stores</font></th>
<dtml-in divs mapping>
<td align="right"><dtml-let url="REQUEST['URL'] +
<th align="right"><dtml-let url="REQUEST['URL'] +
('?chart_start=%s&chart_end=%s'
% (start, end))"><a href="&dtml-url;"><font
color="#ff0000">&dtml-store_count;</font></a></dtml-let></td>
color="#ff0000">&dtml-store_count;</font></a></dtml-let></th>
</dtml-in>
<th align="left">&nbsp; Total:
<font color="#ff0000">&dtml-total_store_count;</font>
......@@ -63,11 +63,10 @@
<tr>
<th align="left" valign="top"><font color="#000080">Object loads</font></th>
<dtml-in divs mapping>
<td align="right"><dtml-let url="REQUEST['URL'] +
<th align="right"><dtml-let url="REQUEST['URL'] +
('?chart_start=%s&chart_end=%s'
% (start, end))"><a href="&dtml-url;"><font
color="#000080">&dtml-load_count;</font></a></dtml-let><br />
<font size="-2">&dtml-time_offset;</font></td>
color="#000080">&dtml-load_count;</font></a></dtml-let></th>
</dtml-in>
<th align="left" valign="top">&nbsp; Total:
<font color="#000080">&dtml-total_load_count;</font>
......@@ -75,6 +74,25 @@
</tr>
<tr>
<th align="left">Connections</th>
<dtml-in divs mapping>
<th align="right">&dtml-connections;</th>
</dtml-in>
<th align="left">&nbsp; Total:
&dtml-total_connections;
</th>
</tr>
<tr>
<th></th>
<dtml-in divs mapping>
<th align="right"><font size="-2">&dtml-time_offset;</font></th>
</dtml-in>
<th></th>
</tr>
</table>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment