internal/rosa: track evaluation time
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m49s
Test / ShareFS (push) Successful in 3m45s
Test / Sandbox (race detector) (push) Successful in 5m22s
Test / Hakurei (race detector) (push) Successful in 6m28s
Test / Hakurei (push) Successful in 2m47s
Test / Flake checks (push) Successful in 1m30s

Useful to track performance regressions over migrations.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-18 22:18:09 +09:00
parent 594221eb78
commit 682b3a2ce5
2 changed files with 18 additions and 0 deletions

View File

@@ -84,12 +84,17 @@ func main() {
flagArch string
flagCheck bool
flagLTO bool
flagET bool
flagCrossOverride int
addr net.UnixAddr
)
c := command.New(os.Stderr, log.Printf, "mbf", func([]string) error {
if flagET {
log.Println("evaluated in", rosa.EvalTime())
}
msg.SwapVerbose(!flagQuiet)
cm.ctx, cm.msg = ctx, msg
cm.base = os.ExpandEnv(cm.base)
@@ -183,6 +188,10 @@ func main() {
&addr.Name,
"socket", command.StringFlag("$MBF_DAEMON_SOCKET"),
"Pathname of socket to bind to",
).Flag(
&flagET,
"eval-time", command.BoolFlag(false),
"Print duration of the initial azalea evaluation",
)
c.NewCommand(