-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollectDataPMBS20.py
More file actions
28 lines (23 loc) · 905 Bytes
/
CollectDataPMBS20.py
File metadata and controls
28 lines (23 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import sveCacheSim as sim
import CacheModels
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pickle
from tqdm import tqdm
nruns = 10
model_name = {CacheModels.FixedHitRateSmartCache:'FR',
CacheModels.Markov4StateSmartCache: 'M4',
CacheModels.Markov8StateSmartCache: 'M8',
CacheModels.AllModelSmartCache: 'ALL'}
data = {}
for size in ['large']:
data[size] = {}
for model in [CacheModels.FixedHitRateSmartCache,
CacheModels.Markov4StateSmartCache,
CacheModels.Markov8StateSmartCache,
CacheModels.AllModelSmartCache]:
data[size][model_name[model]] = [None]*nruns
for i in range(nruns):
data[size][model_name[model]][i],_ = sim.simulation(model, trace_id=size, show_summary=False)
sim.save_object(data, 'DataPMBS20/LargeAllModels10Runs.pkl')