-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess.py
51 lines (43 loc) · 2.55 KB
/
process.py
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
40
41
42
43
44
45
46
47
48
49
50
51
import pandas as pd
import sys
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator, NullLocator, FormatStrFormatter
def process_default_runs(log_prefix):
index = pd.Series(range(20), name="index")
df = pd.DataFrame(columns=["index", "time"])
input_file = "./result/default/{}_00.txt".format(log_prefix)
times = pd.read_csv(input_file, names=["time"], comment="#")
# print times
_new = pd.DataFrame({"index":index, "time":times["time"]})
df = df.append(_new)
df.to_csv("%s_concat.csv" % (log_prefix), sep=",", index=False)
def process_piacin_runs(log_prefix, algo):
index = pd.Series(range(100), name="index")
df = pd.DataFrame(columns=["index", "time"])
input_file = "./result/{}/{}_00.txt".format(algo, log_prefix)
times = pd.read_csv(input_file, names=["time"], comment="#")
# print times
_new = pd.DataFrame({"index":index, "time":times["time"]})
df = df.append(_new)
df.to_csv("{}_{}_concat.csv".format(log_prefix, algo), sep=",", index=False)
if __name__ == '__main__':
process_default_runs("log_bm_regex_v8.py_n_20_bm_50_pypy_piacin_0_run")
process_piacin_runs("log_bm_regex_v8.py_n_100_bm_50_pypy_piacin_1_run", "hc")
process_piacin_runs("log_bm_regex_v8.py_n_100_bm_50_pypy_piacin_1_run", "sa")
process_piacin_runs("log_bm_regex_v8.py_n_100_bm_50_pypy_piacin_1_run", "ga")
process_default_runs("log_bm_nltk_intensifier.py_n_20_bm_50_pypy_piacin_0_run")
process_piacin_runs("log_bm_nltk_intensifier.py_n_100_bm_50_pypy_piacin_1_run", "hc")
process_piacin_runs("log_bm_nltk_intensifier.py_n_100_bm_50_pypy_piacin_1_run", "sa")
process_piacin_runs("log_bm_nltk_intensifier.py_n_100_bm_50_pypy_piacin_1_run", "ga")
process_default_runs("log_bm_sort.py_n_20_bm_50_pypy_piacin_0_run")
process_piacin_runs("log_bm_sort.py_n_100_bm_50_pypy_piacin_1_run", "hc")
process_piacin_runs("log_bm_sort.py_n_100_bm_50_pypy_piacin_1_run", "sa")
process_piacin_runs("log_bm_sort.py_n_100_bm_50_pypy_piacin_1_run", "ga")
process_default_runs("log_bm_image_resize.py_n_20_bm_50_pypy_piacin_0_run")
process_piacin_runs("log_bm_image_resize.py_n_100_bm_50_pypy_piacin_1_run", "hc")
process_piacin_runs("log_bm_image_resize.py_n_100_bm_50_pypy_piacin_1_run", "sa")
process_piacin_runs("log_bm_image_resize.py_n_100_bm_50_pypy_piacin_1_run", "ga")
process_default_runs("log_bm_nonDecInt.py_n_20_bm_50_pypy_piacin_0_run")
process_piacin_runs("log_bm_nonDecInt.py_n_100_bm_50_pypy_piacin_1_run", "hc")
process_piacin_runs("log_bm_nonDecInt.py_n_100_bm_50_pypy_piacin_1_run", "sa")
process_piacin_runs("log_bm_nonDecInt.py_n_100_bm_50_pypy_piacin_1_run", "ga")