[Zodb-checkins] CVS: ZODB3/ZEO - simul.py:1.11
Guido van Rossum
guido@python.org
Tue, 10 Sep 2002 13:53:29 -0400
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv27246
Modified Files:
simul.py
Log Message:
Switch back to decimal MB, to match the actual ZEO default. Change
the BuddyCacheSimulation constructor to round up the cachelimit so
that it reports the actual value used.
=== ZODB3/ZEO/simul.py 1.10 => 1.11 ===
--- ZODB3/ZEO/simul.py:1.10 Mon Sep 9 21:51:20 2002
+++ ZODB3/ZEO/simul.py Tue Sep 10 13:53:28 2002
@@ -39,7 +39,7 @@
def main():
# Parse options
- MB = 1024*1024
+ MB = 1000*1000
cachelimit = 20*MB
simclass = ZEOCacheSimulation
try:
@@ -386,6 +386,9 @@
prev.next = next.prev = self
class BuddyCacheSimulation(LRUCacheSimulation):
+
+ def __init__(self, cachelimit):
+ LRUCacheSimulation.__init__(self, roundup(cachelimit))
def restart(self):
LRUCacheSimulation.restart(self)