diff options
author | Tovin Seven <vinhnt@vn.fujitsu.com> | 2017-02-21 10:46:23 +0700 |
---|---|---|
committer | Tovin Seven <vinhnt@vn.fujitsu.com> | 2017-03-08 08:06:39 +0700 |
commit | d0f5aed40500a5b237c99d92a55a9f51ecf4da02 (patch) | |
tree | 9121eb6188e57a8cc22ce2066462c6dd1e9c5207 /osprofiler/cmd | |
parent | 65a424e457fa30dc930eb891c916be236d09805d (diff) | |
download | osprofiler-d0f5aed40500a5b237c99d92a55a9f51ecf4da02.tar.gz |
Highlight last trace for OSprofiler html output1.7.0
Sometime, exception or error occurs, we want to find problems quickly.
However, if an output of OSprofiler is long, it will very hard to find
where is the last trace that get stuck.
This visualization can help us a lot in finding problems in services.
Example: https://tovin07.github.io/glance-image-list-highlight.html
Change-Id: Iaabb7850db4dfeec8ce38e0ef5264db8122355ef
Diffstat (limited to 'osprofiler/cmd')
-rw-r--r-- | osprofiler/cmd/template.html | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/osprofiler/cmd/template.html b/osprofiler/cmd/template.html index 8695a7d..ac31fc7 100644 --- a/osprofiler/cmd/template.html +++ b/osprofiler/cmd/template.html @@ -117,6 +117,13 @@ return input; }; + vm.isLastTrace = function(started) { + if (started >=0 && started == vm.tree[0].info.last_trace_started) { + return true; + } + return false; + }; + vm.getWidth = function(data) { var fullDuration = vm.tree[0].info.finished; var duration = (data.info.finished - data.info.started) * 100.0 / fullDuration; @@ -208,7 +215,7 @@ <script type="text/ng-template" id="tree_item_renderer.html"> <div ng-init="hide_children=false"> <table class="trace cursor_pointer_on_hover"> - <tr> + <tr ng-class="{'bg-success': vm.isLastTrace(data.info.started)}"> <td class="level" style="padding-left: {{::data.level * 5}}px;"> <button type="button" class="btn btn-default btn-xs" ng-disabled="data.is_leaf" ng-click="hide_children=!hide_children"> <span class="glyphicon glyphicon-{{(data.is_leaf) ? 'cloud' : ((hide_children) ? 'plus': 'minus')}}"></span> |