forked from jensen-yan/gem5_data_proc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfind_var.py
More file actions
executable file
·40 lines (29 loc) · 878 Bytes
/
find_var.py
File metadata and controls
executable file
·40 lines (29 loc) · 878 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
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3.6
import pandas as pd
import numpy as np
def read_raw():
with open("./stat/big_core_whole_cache_dyn_core.csv") as f:
data_frame_raw = pd.read_csv(
filepath_or_buffer=f, header=0, sep=',', index_col=0,
engine='python'
)
return data_frame_raw
def add_qos_to_dict(benchmark, d, qos):
if benchmark in d:
d[benchmark].append(qos)
else:
d[benchmark] = [qos]
df = read_raw()
# print(df.index.values)
# print(df.loc['GemsFDTD_bwaves'])
d = dict()
for index, row in df.iterrows():
b1, b2 = index.split('_')
qos1 = row.loc['QoS_0']
qos2 = row.loc['QoS_1']
add_qos_to_dict(b1, d, qos1)
add_qos_to_dict(b2, d, qos2)
df2 = pd.DataFrame.from_dict(d, orient='index')
df2['std'] = df2.std(axis=1)
df2.sort_values(['std'], ascending=False, inplace=True)
print(df2)