-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalysis.py
More file actions
49 lines (39 loc) · 1.61 KB
/
analysis.py
File metadata and controls
49 lines (39 loc) · 1.61 KB
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
import pandas as pd
import subprocess
import os
from tqdm import tqdm
df = pd.read_csv('dataset/all_data.csv')
print(df)
sc_list = [0]
for filename in os.listdir("dataset/all"):
sc_list.append(filename)
print('len(sc_list): ',str(len(sc_list)))
all_result = []
java_command = [
"java", "-jar", "iSCREAM-Replication-Package/target/iSCREAM-jar-with-dependencies.jar",
"-p", f"dataset/all/",
"-o", "temporary_output.csv" # 临时输出文件
]
subprocess.call(java_command)
# for index, row in tqdm(df.iterrows()):
# # if f"{row['file']}.sol" in sc_list:
# # subprocess.call(["java", "-jar", "iSCREAM-Replication-Package/target/iSCREAM-jar-with-dependencies.jar", "-p",
# # f"dataset/all/{row['file']}.sol", "-o", f"dataset/{row['type']}/{row['file']}.csv"])
# # else:
# # print(f"File {row['file']}.sol not found")
# sol_file = f"{row['file']}.sol"
# if sol_file in sc_list:
# java_command = [
# "java", "-jar", "iSCREAM-Replication-Package/target/iSCREAM-jar-with-dependencies.jar",
# "-p", f"dataset/all/{sol_file}",
# "-o", "temporary_output.csv" # 临时输出文件
# ]
# subprocess.call(java_command)
# temp_df = pd.read_csv("temporary_output.csv")
# temp_df.insert(0, "type", row['type'])
# temp_df.insert(0, "file", row['file'])
# all_result = pd.concat([all_result, temp_df], ignore_index=True)
# else:
# print(f"File {sol_file} not found")
# all_result.to_csv('dataset/all_analysis_result.csv', index=False)
# print("Done!")