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

Commit 1cbd168

Browse files
committed
save the interrupt to the node
Signed-off-by: shaoshian <1196753438@qq.com>
1 parent 6a18c51 commit 1cbd168

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

analyzer/analyzer.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def print_remote_log(self,node_log,node):
104104
except Exception as e:
105105
common.printout("WARNING","print_remote_log failed")
106106
common.printout("WARNING",str(e))
107-
108107

109108
def process_data(self):
110109
case_type = re.findall('\d\-\S+', self.cluster["dest_dir"])[0].split('-')[2]
@@ -138,7 +137,6 @@ def process_data(self):
138137
common.scp(self.cluster["user"],node,remote_file2,self.cluster["tmp_dir"])
139138
common.scp(self.cluster["user"],node,remote_file3,self.cluster["tmp_dir"])
140139
common.scp(self.cluster["user"],node,remote_file4,self.cluster["tmp_dir"])
141-
142140
try:
143141
common.pdsh(self.cluster["user"],[node],"echo \"\" > " + self.cluster["tmp_dir"] +node+"-cetune_console.log")
144142
except:
@@ -196,7 +194,6 @@ def process_data(self):
196194
workload = self._process_remote_data(workload_file)
197195
self.result["vclient"][dir_name]=system
198196
self.result["workload"].update(workload)
199-
200197
#-------------------remote end--------------------------
201198
else:
202199
for dir_name in os.listdir(dest_dir):
@@ -523,7 +520,7 @@ def interrupt_diff(self,dest_dir,node_name,s_path,e_path):
523520
s_p = s_path
524521
e_p = e_path
525522
result_name = node_name+'_interrupt.txt'
526-
result_path = os.path.join(dest_dir.replace('raw','conf'),result_name)
523+
result_path = os.path.join(dest_dir,node_name,result_name)
527524
s_l = []
528525
e_l = []
529526
diff_list = []
@@ -566,7 +563,7 @@ def interrupt_diff(self,dest_dir,node_name,s_path,e_path):
566563
output.writelines(line_str)
567564
output.close()
568565
else:
569-
print 'ERROR: interrupt_start lines and interrupt_end lines are diffrent ! can not calculate diffrent value!'
566+
common.printout("ERROR",'interrupt_start lines and interrupt_end lines are diffrent ! can not calculate diffrent value!')
570567

571568
def check_interrupt(self,s_inter,e_inter):
572569
result = "True"

analyzer/analyzer_remote.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def interrupt_diff(self,dest_dir,node_name,s_path,e_path):
421421
s_p = s_path
422422
e_p = e_path
423423
result_name = node_name+'_interrupt.txt'
424-
result_path = os.path.join(dest_dir.replace('raw','conf'),result_name)
424+
result_path = os.path.join(dest_dir,node_name,result_name)
425425
s_l = []
426426
e_l = []
427427
diff_list = []
@@ -464,7 +464,7 @@ def interrupt_diff(self,dest_dir,node_name,s_path,e_path):
464464
output.writelines(line_str)
465465
output.close()
466466
else:
467-
print 'ERROR: interrupt_start lines and interrupt_end lines are diffrent ! can not calculate diffrent value!'
467+
common.printout("ERROR",'interrupt_start lines and interrupt_end lines are diffrent ! can not calculate diffrent value!')
468468

469469
def check_interrupt(self,s_inter,e_inter):
470470
result = "True"

0 commit comments

Comments
 (0)