[Zodb-checkins] CVS: ZODB3/ZEO - simul.py:1.7
Guido van Rossum
guido@python.org
Mon, 9 Sep 2002 14:57:20 -0400
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv23141
Modified Files:
simul.py
Log Message:
Tweak the cache sizes to be counted in units of 1024*1024 rather than
1000*1000. This makes it easier to specify cache sizes for the buddy
system that don't have to be rounded up to the next power of two. It
does make future reported results incompatible with past results.
=== ZODB3/ZEO/simul.py 1.6 => 1.7 ===
--- ZODB3/ZEO/simul.py:1.6 Mon Sep 9 14:55:11 2002
+++ ZODB3/ZEO/simul.py Mon Sep 9 14:57:19 2002
@@ -32,7 +32,8 @@
def main():
# Parse options
- cachelimit = 20*1000*1000
+ MB = 1024*1024
+ cachelimit = 20*MB
simclass = ZEOCacheSimulation
try:
opts, args = getopt.getopt(sys.argv[1:], "bls:")
@@ -45,7 +46,7 @@
if o == '-l':
simclass = LRUCacheSimulation
if o == '-s':
- cachelimit = int(float(a) * 1e6)
+ cachelimit = int(float(a)*MB)
if len(args) != 1:
usage("exactly one file argument required")
return 2