From f5aefa03a4e465305ae4faa3b6ffe8d85a2ed061 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 31 Jan 2017 11:50:32 +1100 Subject: [PATCH] Fix reporting of profiler traces with multiple toplevels The Profiler panel was only showing the first of potentally many toplevel events in a request. This patch reinstates those events by displaying the root event rather than its first child. Change-Id: Ifeb0c3ee16168335e7b41c1063897ccdf5511800 Closes-Bug: 1660449 (cherry picked from commit d256d0025f03d83e784286af5fbd06a95fb43b39) --- openstack_dashboard/contrib/developer/profiler/api.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openstack_dashboard/contrib/developer/profiler/api.py b/openstack_dashboard/contrib/developer/profiler/api.py index a36e5bfda..240ca294a 100644 --- a/openstack_dashboard/contrib/developer/profiler/api.py +++ b/openstack_dashboard/contrib/developer/profiler/api.py @@ -105,9 +105,7 @@ def get_trace(request, trace_id): engine = _get_engine(request) trace = engine.get_report(trace_id) - # NOTE(tsufiev): throw away toplevel node which is dummy and doesn't - # contain any info, use its first and only child as the toplevel node - data, max_finished = rec(trace['children'][0]) + data, max_finished = rec(trace) data['info']['max_finished'] = max_finished return data