Commit fe37bbe2 authored by Guido van Rossum's avatar Guido van Rossum

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.
parent 6baa6ebc
......@@ -39,7 +39,7 @@ def usage(msg):
def main():
# Parse options
MB = 1024*1024
MB = 1000*1000
cachelimit = 20*MB
simclass = ZEOCacheSimulation
try:
......@@ -387,6 +387,9 @@ class Node:
class BuddyCacheSimulation(LRUCacheSimulation):
def __init__(self, cachelimit):
LRUCacheSimulation.__init__(self, roundup(cachelimit))
def restart(self):
LRUCacheSimulation.restart(self)
self.allocator = self.allocatorFactory(self.cachelimit)
......
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