From d3e32dc85cd52eef7cf85a703e097873dc05fcae Mon Sep 17 00:00:00 2001 From: "Chendi.Xue" Date: Mon, 21 Aug 2017 14:10:57 +0800 Subject: [PATCH] [BUG FIX]some fix when doing rebase Signed-off-by: Chendi.Xue --- conf/common.py | 4 ++-- visualizer/create_DB.py | 6 +++--- visualizer/visualizer.py | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/conf/common.py b/conf/common.py index 2aa748a..896b57e 100644 --- a/conf/common.py +++ b/conf/common.py @@ -20,8 +20,8 @@ #cetune_log_file = "../conf/cetune_process.log" #cetune_error_file = "../conf/cetune_error.log" cetune_console_file = "../conf/cetune_console.log" -#cetune_log_file = "../log/cetune_process_log_file.log" -#cetune_error_file = "../log/cetune_error_log_file.log" +cetune_log_file = "../log/cetune_process_log_file.log" +cetune_error_file = "../log/cetune_error_log_file.log" case_conf_file = "../conf/cases.conf" tuner_yaml_file = "../conf/tuner.yaml" cetune_python_log_file = "../log/cetune_python_log_file.log" diff --git a/visualizer/create_DB.py b/visualizer/create_DB.py index a3f0331..c28d4bf 100644 --- a/visualizer/create_DB.py +++ b/visualizer/create_DB.py @@ -77,11 +77,11 @@ def insert_to_TB(self,data,dbpath): if rowdata[4] == '': rowdata[4] = 'None' if len(rowdata) == 22: - sqlstr = "insert into tb_report (runid,runid_tr,timestamp,status,description,opsize,optype,qd,driver,snnumber,cnnumber,worker,runtime,iops,bw,latency,latency_95,latency_99,latency_9999,sniops,snbw,snlatency) values ("+rowdata[1]+",'"+rowdata[0]+"','"+rowdata[2]+"','"+rowdata[3]+"','"+rowdata[4]+"','"+rowdata[5]+"','"+rowdata[6]+"','"+rowdata[7]+"','"+rowdata[8]+"',"+rowdata[9]+","+rowdata[10]+",'"+rowdata[11]+"',"+rowdata[12]+",'"+rowdata[13]+"','"+rowdata[14]+"','"+rowdata[15]+"','"+rowdata[16]+"','"+rowdata[17]+"','"+rowdata[18]+"','"+rowdata[19]+"','"+rowdata[20]+"','"+rowdata[21]+"')" + sqlstr = "insert into tb_report (runid,runid_tr,timestamp,status,description,opsize,optype,qd,driver,snnumber,cnnumber,worker,runtime,iops,bw,latency,latency_95,latency_99,latency_9999,sniops,snbw,snlatency) values ("+rowdata[1]+",'"+rowdata[0]+"','"+rowdata[2]+"','"+rowdata[3]+"','"+rowdata[4]+"','"+rowdata[5]+"','"+rowdata[6]+"','"+rowdata[7]+"','"+rowdata[8]+"',"+rowdata[9]+","+rowdata[10]+",'"+rowdata[11]+"','"+rowdata[12]+"','"+rowdata[13]+"','"+rowdata[14]+"','"+rowdata[15]+"','"+rowdata[16]+"','"+rowdata[17]+"','"+rowdata[18]+"','"+rowdata[19]+"','"+rowdata[20]+"','"+rowdata[21]+"')" elif len(rowdata) == 20: - sqlstr = "insert into tb_report (runid,runid_tr,timestamp,status,description,opsize,optype,qd,driver,snnumber,cnnumber,worker,runtime,iops,bw,latency,latency_95,latency_99,latency_9999,sniops,snbw,snlatency) values ("+rowdata[1]+",'"+rowdata[0]+"','"+rowdata[2]+"','"+rowdata[3]+"','"+rowdata[4]+"','"+rowdata[5]+"','"+rowdata[6]+"','"+rowdata[7]+"','"+rowdata[8]+"',"+rowdata[9]+","+rowdata[10]+",'"+rowdata[11]+"',"+rowdata[12]+",'"+rowdata[13]+"','"+rowdata[14]+"','"+rowdata[15]+"','0.00','"+rowdata[16]+"','0.00','"+rowdata[17]+"','"+rowdata[18]+"','"+rowdata[19]+"')" + sqlstr = "insert into tb_report (runid,runid_tr,timestamp,status,description,opsize,optype,qd,driver,snnumber,cnnumber,worker,runtime,iops,bw,latency,latency_95,latency_99,latency_9999,sniops,snbw,snlatency) values ("+rowdata[1]+",'"+rowdata[0]+"','"+rowdata[2]+"','"+rowdata[3]+"','"+rowdata[4]+"','"+rowdata[5]+"','"+rowdata[6]+"','"+rowdata[7]+"','"+rowdata[8]+"',"+rowdata[9]+","+rowdata[10]+",'"+rowdata[11]+"','"+rowdata[12]+"','"+rowdata[13]+"','"+rowdata[14]+"','"+rowdata[15]+"','0.00','"+rowdata[16]+"','0.00','"+rowdata[17]+"','"+rowdata[18]+"','"+rowdata[19]+"')" elif len(rowdata) == 19: - sqlstr = "insert into tb_report (runid,runid_tr,timestamp,status,description,opsize,optype,qd,driver,snnumber,cnnumber,worker,runtime,iops,bw,latency,latency_95,latency_99,latency_9999,sniops,snbw,snlatency) values ("+rowdata[1]+",'"+rowdata[0]+"','"+rowdata[2]+"','"+rowdata[3]+"','"+rowdata[4]+"','"+rowdata[5]+"','"+rowdata[6]+"','"+rowdata[7]+"','"+rowdata[8]+"',"+rowdata[9]+","+rowdata[10]+",'"+rowdata[11]+"',"+rowdata[12]+",'"+rowdata[13]+"','"+rowdata[14]+"','"+rowdata[15]+"','0.00','0.00','0.00','"+rowdata[16]+"','"+rowdata[17]+"','"+rowdata[18]+"')" + sqlstr = "insert into tb_report (runid,runid_tr,timestamp,status,description,opsize,optype,qd,driver,snnumber,cnnumber,worker,runtime,iops,bw,latency,latency_95,latency_99,latency_9999,sniops,snbw,snlatency) values ("+rowdata[1]+",'"+rowdata[0]+"','"+rowdata[2]+"','"+rowdata[3]+"','"+rowdata[4]+"','"+rowdata[5]+"','"+rowdata[6]+"','"+rowdata[7]+"','"+rowdata[8]+"',"+rowdata[9]+","+rowdata[10]+",'"+rowdata[11]+"','"+rowdata[12]+"','"+rowdata[13]+"','"+rowdata[14]+"','"+rowdata[15]+"','0.00','0.00','0.00','"+rowdata[16]+"','"+rowdata[17]+"','"+rowdata[18]+"')" print sqlstr conn.execute(sqlstr) conn.commit() diff --git a/visualizer/visualizer.py b/visualizer/visualizer.py index fbccb98..ea1ffaa 100644 --- a/visualizer/visualizer.py +++ b/visualizer/visualizer.py @@ -337,7 +337,6 @@ def save_data_to_csv(self,data,node_type,field_type,session_name): title_row = [] title_row = common.get_title_list(data) title_row.insert(0,'') - print title_row csv_list.append(title_row) for detail_node, detail_data in data.items(): row = [detail_node]