Exemple #1
0
 def __init__(self, c, **kwargs):
     # c is cache size
     self.c = c
     self.cn = 0
     self.head = None
     self.tail = None
     self.stored = {}
     self.hitcount = 0
     self.count = 0
     self.stats = statbase()
Exemple #2
0
 def __init__(self, c, **kwargs):
     # c is cache size
     self.c = c  # Max
     self.cn = 0  # Current
     self.hand = 0
     self.cache = []  # keys
     self.stored = {}  # key => entry
     self.hitcount = 0
     self.count = 0
     self.stats = statbase()
Exemple #3
0
 def __init__(self, c, **kwargs):
     # c is cache size
     self.c = c  # Max
     self.cn = 0 # Current
     self.hand = 0
     self.cache = [] # keys
     self.stored = {} # key => entry
     self.hitcount = 0
     self.count = 0
     self.stats = statbase()
Exemple #4
0
 def __init__(self, c, **kwargs):
     random.seed(1337)
     # c is cache size
     self.c = c
     self.cn = 0
     self.cache = []
     self.stored = {} # key => item
     self.hitcount = 0
     self.count = 0
     self.stats = statbase()
Exemple #5
0
 def __init__(self, c, **kwargs):
     # c is cache size
     self.c = c
     self.cn = 0
     self.head = None
     self.tail = None
     self.stored = {}
     self.hitcount = 0
     self.count = 0
     self.stats = statbase()
Exemple #6
0
 def __init__(self, c, **kwargs):
     random.seed(1337)
     # c is cache size
     self.c = c
     self.cn = 0
     self.cache = []
     self.stored = {}  # key => item
     self.hitcount = 0
     self.count = 0
     self.stats = statbase()
Exemple #7
0
 def __init__(self, c):
     random.seed(1337)
     # c is cache size
     self.c = c
     self.k = 3
     self.cn = 0
     self.cache = []  # (key)
     self.stored = {}  # key => entry
     self.hitcount = 0
     self.count = 0
     self.stats = statbase()
Exemple #8
0
 def __init__(self, c):
     random.seed(1337)
     # c is cache size
     self.c = c
     self.k = 3
     self.cn = 0
     self.cache = [] # (key)
     self.stored = {} # key => entry
     self.hitcount = 0
     self.count = 0
     self.stats = statbase()
Exemple #9
0
 def __init__(self, c, **kwargs):
     self.c = c        # Cache size
     self.cn = 0       # Items in cache now
     self.cached = {}  # Cached keys
     self.hitcount = 0
     self.count = 0
     self.p = 0
     self.t1 = Deque()
     self.t2 = Deque()
     self.b1 = Deque()
     self.b2 = Deque()
     self.stats = statbase()