Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

fix 'add cancel button on cetune status page' pr bug #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions benchmarking/mod/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ def __init__(self):

def go(self, testcase, tuning):
try:
cancel_file = open("../conf/execute_op_type.conf","r")
execute_op_type = cancel_file.read().strip("\n")
if execute_op_type != "cancel_all":
self.execute_op_type = "execute"
if os.path.exists("../conf/execute_op_type.conf"):
cancel_file = open("../conf/execute_op_type.conf","r")
self.execute_op_type = cancel_file.read().strip("\n")
if self.execute_op_type != "cancel_all":
common.bash("rm -f %s/conf/%s" % (self.pwd, common.cetune_log_file))
common.bash("rm -f %s/conf/%s" % (self.pwd, common.cetune_error_file))
user = self.all_conf_data.get("user")
Expand Down Expand Up @@ -49,6 +51,8 @@ def go(self, testcase, tuning):
self.run()
except KeyboardInterrupt:
interrupted_flag = True
self.execute_op_type = "cancel_one"
os.system("echo 'cancel_one' > ../conf/execute_op_type.conf")
self.setStatus("Interrupted")
common.printout("WARNING","Caught Signal to Cancel this run, killing Workload now, pls wait")
self.real_runtime = time.time() - test_start_time
Expand Down
1 change: 1 addition & 0 deletions benchmarking/run_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def main(args):
if len(p) > 0 and p!="\n":
if not p[0].startswith('#'):
testcase_list.append({"engine":p[0],"parameter":p[1:]})
os.system("echo 'execute' > ../conf/execute_op_type.conf")
for testcase in testcase_list:
if testcase["engine"] == "qemurbd":
benchmark = qemurbd.QemuRbd()
Expand Down