MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / run

Function run

scripts/plot_mrc_size.py:200–219  ·  view source on GitHub ↗

a function that runs the cachesim on all the traces in /disk/data

()

Source from the content-addressed store, hash-verified

198
199
200def run():
201 """
202 a function that runs the cachesim on all the traces in /disk/data
203
204 """
205
206 import glob
207
208 algos = "lru,slru,arc,lirs,lhd,tinylfu,s3fifo,sieve"
209 cache_sizes = "0.01,0.02,0.05,0.075,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.5,0.6,0.7,0.8"
210
211 for tracepath in glob.glob("/disk/data/*.zst"):
212 dataname = extract_dataname(tracepath)
213 mrc_dict = run_cachesim_size(tracepath, algos, cache_sizes,
214 ignore_obj_size=True)
215 # save the results in pickle
216 with open("{}.mrc".format(dataname), "wb") as f:
217 pickle.dump(mrc_dict, f)
218
219 plot_mrc_size(mrc_dict, dataname)
220
221
222if __name__ == "__main__":

Callers 2

plot_mrc_size.pyFile · 0.70
PopularityMethod · 0.50

Calls 4

extract_datanameFunction · 0.90
run_cachesim_sizeFunction · 0.85
plot_mrc_sizeFunction · 0.70
dumpMethod · 0.45

Tested by

no test coverage detected