Browse Source

add summary info for step trace graph and change the name.

tags/v0.5.0-beta
yelihua 5 years ago
parent
commit
7abccc0724
3 changed files with 6 additions and 6 deletions
  1. +1
    -1
      mindinsight/backend/profiler/profile_api.py
  2. +5
    -4
      mindinsight/profiler/analyser/step_trace_analyser.py
  3. +0
    -1
      tests/st/func/profiler/test_analyse.py

+ 1
- 1
mindinsight/backend/profiler/profile_api.py View File

@@ -134,7 +134,7 @@ def get_training_trace_graph():
'mode': 'step',
'step_id': graph_type
}})
graph_info['summary'] = analyser.summary
return jsonify(graph_info)


+ 5
- 4
mindinsight/profiler/analyser/step_trace_analyser.py View File

@@ -192,10 +192,11 @@ class StepTraceAnalyser(BaseAnalyser):
fp_point = row_info_dict.get('fp_point', 0)
bp_point = row_info_dict.get('bp_point', 0)
points = [
self._construct_time_point('', 0, row_info_dict.get('iteration_interval', 0)),
self._construct_time_point('fp_and_bp', fp_point - start_point,
row_info_dict.get('fp_and_bp', 0)),
self._construct_time_point('', bp_point - start_point, row_info_dict.get('tail', 0)),
self._construct_time_point(
'iteration_interval', 0, row_info_dict.get('iteration_interval', 0)),
self._construct_time_point(
'fp_and_bp', fp_point - start_point, row_info_dict.get('fp_and_bp', 0)),
self._construct_time_point('tail', bp_point - start_point, row_info_dict.get('tail', 0))
]
return points



+ 0
- 1
tests/st/func/profiler/test_analyse.py View File

@@ -98,7 +98,6 @@ class TestProfilerAnalyse(TestCase):
{'name': 'stream_540_parallel_0', 'start': 118.3705, 'duration': 49.281},
{'name': '', 'start': 167.6515, 'duration': 37.7294}]


@pytest.mark.level0
@pytest.mark.env_single
@pytest.mark.platform_x86_cpu


Loading…
Cancel
Save