File tree Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,8 @@ export default Ember.Component.extend({
60
60
subTree = this . convert ( child ) ;
61
61
if ( subTree ) {
62
62
node . children . push ( subTree ) ;
63
+ treeValue += subTree . treeValue ;
63
64
}
64
- treeValue += subTree . treeValue ;
65
65
}
66
66
node . treeValue = treeValue ;
67
67
node . time = this . formatTime ( node . treeValue ) ;
@@ -81,7 +81,7 @@ export default Ember.Component.extend({
81
81
for ( let p in obj ) {
82
82
if ( obj . hasOwnProperty ( p ) && p !== 'own' ) {
83
83
if ( typeof obj [ p ] === 'object' ) {
84
- if ( p !== 'time' ) {
84
+ if ( p !== 'time' || ( p === 'time' && Object . keys ( obj [ p ] ) . length > 1 ) ) {
85
85
let padded = p + pad . repeat ( 13 ) . substring ( 0 , pad . length * 13 - p . length * 6 ) ;
86
86
str += ' ' . repeat ( indent ) + padded + ( indent <= 0 ? '<br/>' : '' ) + objToString ( obj [ p ] ) ;
87
87
}
@@ -105,8 +105,7 @@ export default Ember.Component.extend({
105
105
let time = _this . formatTime ( d . data . treeValue ) ;
106
106
let percent = " [" + ( ( ( d . data . treeValue / _this . get ( 'totalTime' ) ) * 100 ) . toFixed ( 1 ) ) + "%]" ;
107
107
let self = " (self: " + _this . formatTime ( d . data . stats . time . self ) + ")" ;
108
- let res = d . data . name + "<br/>" + time + percent + self + "<br/>" + objToString ( d . data . stats ) ;
109
- return res ;
108
+ return d . data . name + "<br/>" + time + percent + self + "<br/>" + objToString ( d . data . stats ) ;
110
109
} ;
111
110
112
111
let clientHeight = document . getElementsByClassName ( 'flame-graph' ) [ 0 ] . clientHeight ;
Original file line number Diff line number Diff line change 1
1
body {
2
- /* margin-top: 3.5rem;*/
2
+ margin-top : 3.5rem ;
3
3
}
4
4
5
5
html ,
6
- body {
7
- height : 100% ;
8
- }
9
-
10
- body > [class = "ember-view" ] {
11
- height : 100% ;
12
- }
13
-
6
+ body ,
7
+ body > [class = "ember-view" ],
14
8
.flame-graph {
15
9
height : 100% ;
16
10
}
@@ -55,7 +49,7 @@ body > [class="ember-view"] {
55
49
display : inline-block;
56
50
position : relative;
57
51
width : 100% ;
58
- /* padding-bottom: 100%;*/
52
+ padding-bottom : 100% ;
59
53
vertical-align : top;
60
54
overflow : hidden;
61
55
cursor : move;
You can’t perform that action at this time.
0 commit comments