提交 65f37e33 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!350 Fix minddata device_queue_op time info error.

Merge pull request !350 from yuximiao/r0.5
......@@ -116,13 +116,13 @@ class MinddataAnalyser(BaseAnalyser):
# op_info: 2: step num 3: cost time
if op_info[1] == "0":
get_time_list.append([int(op_info[2]), float(op_info[3])])
total_cost += float(op_info[3])
total_get += float(op_info[3])
elif op_info[1] == "1":
push_time_list.append([int(op_info[2]), float(op_info[3])])
total_push += float(op_info[3])
elif op_info[1] == "2":
total_time_list.append([int(op_info[2]), float(op_info[3])])
total_get += float(op_info[3])
total_cost += float(op_info[3])
elif op_info and op_info[0] == "1" and info_type in ["all", "queue"]:
queue_size_list.append([int(op_info[2]), int(op_info[3])])
if op_info[1] == op_info[3]:
......
......@@ -118,7 +118,10 @@ def get_summary_for_step_trace(average_info, header):
def calculate_percent(partial, total):
"""Calculate percent value."""
if total:
percent = round(partial / total * 100, 2)
else:
percent = 0
return f'{percent}%'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册