From e6b8398d91b089bcc2776ce2f44cdf1c9ea17eb5 Mon Sep 17 00:00:00 2001 From: Bronley Plumb Date: Thu, 17 Oct 2024 16:16:49 -0400 Subject: [PATCH] Track and print discover time --- lib/components/Reftracker.bs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/components/Reftracker.bs b/lib/components/Reftracker.bs index 95ffda7..92a9f1a 100644 --- a/lib/components/Reftracker.bs +++ b/lib/components/Reftracker.bs @@ -27,6 +27,8 @@ 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) @@ -34,6 +36,7 @@ function discover(_ = invalid) '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