lib: Add timing for topological sort

At least for consistency with everyone else...
This commit is contained in:
James Shubin
2025-03-27 06:09:08 -04:00
parent fce250b8af
commit 0d4c6e272d

View File

@@ -972,6 +972,7 @@ func (obj *Main) Run() error {
Logf("send/recv building took: %s", time.Since(timing)) Logf("send/recv building took: %s", time.Since(timing))
// Double check before we commit. // Double check before we commit.
timing = time.Now()
if err := obj.ge.Apply(func(graph *pgraph.Graph) error { if err := obj.ge.Apply(func(graph *pgraph.Graph) error {
_, e := graph.TopologicalSort() // am i a dag or not? _, e := graph.TopologicalSort() // am i a dag or not?
return e return e
@@ -980,6 +981,7 @@ func (obj *Main) Run() error {
Logf("error running the TopologicalSort: %+v", err) Logf("error running the TopologicalSort: %+v", err)
continue continue
} }
Logf("resource topological sort took: %s", time.Since(timing))
// TODO: do we want to do a transitive reduction? // TODO: do we want to do a transitive reduction?
// FIXME: run a type checker that verifies all the send->recv relationships // FIXME: run a type checker that verifies all the send->recv relationships