File tree Expand file tree Collapse file tree 1 file changed +8
-25
lines changed
src/view/components/profiler/flamegraph/modes Expand file tree Collapse file tree 1 file changed +8
-25
lines changed Original file line number Diff line number Diff line change @@ -45,32 +45,11 @@ export function FlamegraphLayout({
45
45
< Fragment >
46
46
{ placed . map ( pos => {
47
47
const node = commit . nodes . get ( pos . id ) ! ;
48
- let text : any = "" ;
49
- if ( pos . commitParent || pos . weight === - 1 ) {
50
- text = (
51
- < >
52
- { node . name }
53
- { filterHoc && node . hocs ? (
54
- < HocLabels hocs = { node . hocs } nodeId = { node . id } canMark = { false } />
55
- ) : (
56
- ""
57
- ) }
58
- </ >
59
- ) ;
60
- } else {
48
+ let appendix = "" ;
49
+ if ( ! pos . commitParent && pos . weight !== - 1 ) {
61
50
const self = formatTime ( commit . selfDurations . get ( node . id ) ! ) ;
62
51
const total = formatTime ( node . endTime - node . startTime ) ;
63
- text = (
64
- < >
65
- { node . name }
66
- { filterHoc && node . hocs ? (
67
- < HocLabels hocs = { node . hocs } nodeId = { node . id } canMark = { false } />
68
- ) : (
69
- ""
70
- ) } { " " }
71
- ({ self } of { total } )
72
- </ >
73
- ) ;
52
+ appendix = ` (${ self } of ${ total } )` ;
74
53
}
75
54
76
55
return (
@@ -85,7 +64,11 @@ export function FlamegraphLayout({
85
64
parentId = { commit . nodes . get ( pos . id ) ! . parent }
86
65
onClick = { onSelect }
87
66
>
88
- { text }
67
+ { node . name }
68
+ { filterHoc && node . hocs ? (
69
+ < HocLabels hocs = { node . hocs } nodeId = { node . id } canMark = { false } />
70
+ ) : null }
71
+ { appendix }
89
72
</ FlameNode >
90
73
) ;
91
74
} ) }
You can’t perform that action at this time.
0 commit comments