Skip to content

Commit

Permalink
Track and print discover time
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Oct 17, 2024
1 parent 0df21e0 commit e6b8398
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/components/Reftracker.bs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ end function

'@public
function discover(_ = invalid)
m.discoverTimer = createObject("roTimeSpan")
m.discoverTimer.mark()
'seed the list of nodes with all roots (should be a good starting point)
for each root in m.top.getRoots() as roSGnode[]
registerNodeRef(`<${root.subtype()}>`, "", root)
end for

'process the nodes one-by-one
return reftracker.promises.onThen(processNodes(), function(result)
reftracker.internal.writeLog(`Reftracker.discover() took ${m.discoverTimer.TotalMilliseconds() / 1000} seconds` )
printNodes()
end function)
end function
Expand Down

0 comments on commit e6b8398

Please sign in to comment.