From 0ea1b713ae43cf5ed3e432cffd5fc26dd85cce70 Mon Sep 17 00:00:00 2001 From: liyl_kl Date: Tue, 5 Mar 2024 11:05:08 +0800 Subject: [PATCH] Add data does not allow multiple deposit function --- run.sh | 5 ++--- src/kytuning/report.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/run.sh b/run.sh index 92f380d..99266cd 100644 --- a/run.sh +++ b/run.sh @@ -26,8 +26,7 @@ function init() { if [ ! -d ${tools_path} ]; then mkdir ${tools_path} fi - file1="$base_dir/all_json_file.json" - if [ -f $file1 ];then + if [ -f "$base_dir/all_json_file.json-bak" ];then file2="$base_dir/all_json_file-"`date +"%Y%m%d%H%M%S"`".json" mv $base_dir/all_json_file.json-bak $file2 fi @@ -265,7 +264,7 @@ function main() { run "$rk_benchmark" if [ $? -eq 0 ] && [ $UPLOAD="true" ] ;then sed -i 's/NR\/RE//g' $base_dir/all_json_file.json - python3 ./send.py $base_dir/all_json_file.json + python3 ./send.py fi else parse_cmd $@ diff --git a/src/kytuning/report.py b/src/kytuning/report.py index a2924d3..582e976 100644 --- a/src/kytuning/report.py +++ b/src/kytuning/report.py @@ -305,8 +305,8 @@ class Report(object): :param env_data:初始环境信息数据 :return all_json_file.json文件路径 """ - # import pdb; - # pdb.set_trace() + time_stamp = time.time() + env_data = env_data[:-1]+',"time":'+str(time_stamp) + '}' all_json_file = os.path.abspath(os.path.join(self.basepath, "../../", "all_json_file.json")) if not os.path.exists(all_json_file): with open(all_json_file, 'w+', encoding='utf-8') as f: -- Gitee