[Zodb-checkins] CVS: ZODB3/ZEO - stats.py:1.17.6.1.18.4
Tim Peters
cvs-admin at zope.org
Mon Dec 1 21:39:11 EST 2003
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv15109/ZEO
Modified Files:
Tag: Zope-2_6-branch
stats.py
Log Message:
Changed temporal distance to mean the delta across number of load attempts.
This can never be 0 (and isn't <wink>). I remain unclear on what was
actually being measured before. Dump changes to:
Histogram of temporal distance
Dist = floor(log2(distance))
Total oids with 1 load: 20,689
Total oids with 2 or more loads: 66,890
Dist Count % Cumm%
0 47039 4.32 4.32
1 3467 0.32 4.63
2 4139 0.38 5.01
3 6229 0.57 5.59
4 11871 1.09 6.67
5 13536 1.24 7.92
6 14203 1.30 9.22
7 11601 1.06 10.28
8 13623 1.25 11.53
9 17158 1.57 13.11
10 34198 3.14 16.25
11 48331 4.43 20.68
12 89128 8.18 28.86
13 95058 8.72 37.58
14 114634 10.52 48.10
15 339801 31.18 79.28
16 140325 12.88 92.16
17 54998 5.05 97.20
18 24100 2.21 99.41
19 6360 0.58 100.00
20 24 0.00 100.00
Dist=0 there now means two consecutive loads tried to suck up the same
oid. It's still unclear why that happens so often.
=== ZODB3/ZEO/stats.py 1.17.6.1.18.3 => 1.17.6.1.18.4 ===
--- ZODB3/ZEO/stats.py:1.17.6.1.18.3 Mon Dec 1 21:07:43 2003
+++ ZODB3/ZEO/stats.py Mon Dec 1 21:39:10 2003
@@ -205,7 +205,7 @@
if code & 0x70 == 0x20:
oids[oid] = oids.get(oid, 0) + 1
total_loads += 1
- refs.setdefault(oid, []).append(datarecords)
+ refs.setdefault(oid, []).append(total_loads)
if code in (0x00, 0x70):
if not quiet:
dumpbyinterval(byinterval, h0, he)
@@ -299,8 +299,7 @@
repeats += 1
for i in xrange(1, len(L)):
distance = L[i] - L[i-1]
- # XXX How can we get a distance of 0? We do.
- lg_distance = int(log(distance or 1) / LOG2)
+ lg_distance = int(log(distance) / LOG2)
dist[lg_distance] = dist.get(lg_distance, 0) + 1
L = dist.items()
More information about the Zodb-checkins
mailing list