aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-18 22:18:09 +0900
committerOphestra <cat@gensokyo.uk>2026-05-18 22:18:09 +0900
commit682b3a2ce53252b2bd0c0da86c89c392f74f68e0 (patch)
treeed1c0c519b64ff242fa9b8153fbbcb33bcf3ccea /cmd
parent594221eb78fede12840121982782a470e6ed29d0 (diff)
internal/rosa: track evaluation time
Useful to track performance regressions over migrations. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mbf/main.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go
index 69e84fce..526dce50 100644
--- a/cmd/mbf/main.go
+++ b/cmd/mbf/main.go
@@ -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(