a function that runs the cachesim on all the traces in /disk/data
()
| 198 | |
| 199 | |
| 200 | def 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 | |
| 222 | if __name__ == "__main__": |
no test coverage detected