File tree Expand file tree Collapse file tree 1 file changed +11
-17
lines changed
src/view/components/profiler/components/RenderedAt Expand file tree Collapse file tree 1 file changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -9,24 +9,18 @@ export function RenderedAt() {
99 const data = useObserver ( ( ) => {
1010 const id = store . profiler . selectedNodeId . $ ;
1111
12- return store . profiler . commits . $ . filter ( x => {
13- if ( x . nodes . has ( id ) ) {
14- const node = x . nodes . get ( id ) ! ;
15- const root = x . nodes . get ( x . commitRootId ) ! ;
16- return node . startTime >= root . startTime && node . endTime <= root . endTime ;
17- }
12+ return store . profiler . commits . $ . filter ( x => x . rendered . includes ( id ) ) . map (
13+ commit => {
14+ const node = commit . nodes . get ( id ) ! ;
1815
19- return false ;
20- } ) . map ( commit => {
21- const node = commit . nodes . get ( id ) ! ;
22-
23- const selfDuration = commit . selfDurations . get ( id ) || 0 ;
24- return {
25- index : store . profiler . commits . $ . findIndex ( x => x === commit ) ,
26- startTime : node . startTime ,
27- selfDuration,
28- } ;
29- } ) ;
16+ const selfDuration = commit . selfDurations . get ( id ) || 0 ;
17+ return {
18+ index : store . profiler . commits . $ . findIndex ( x => x === commit ) ,
19+ startTime : node . startTime ,
20+ selfDuration,
21+ } ;
22+ } ,
23+ ) ;
3024 } ) ;
3125
3226 const commitIdx = useObserver ( ( ) => store . profiler . activeCommitIdx . $ ) ;
You can’t perform that action at this time.
0 commit comments