scripts: Added -Q/--query as alternative to --total

This better matches the runners' new -Q/--query-define flag, and, thanks
to some argparse trickery, is simpler implementation wise.

Example:

  $ ./scripts/code.py lfs3.o -Qsize
      66570

  $ ./scripts/stack.py -Qlimit lfs3.ci
       3312

The only downside is this takes the --small-table shortform flag, but
--small-table doesn't really need a shortform flag.
This commit is contained in:
Christopher Haster
2026-02-12 19:13:53 -06:00
parent cb91b6b2a6
commit 93c85870e8
10 changed files with 257 additions and 154 deletions
+1 -1
View File
@@ -486,7 +486,7 @@ summary-diff sizes-diff: $(OBJ) $(CI)
-fstack='max(stack_limit)' \
-fctx='max(ctx_size)' \
-o-) \
-bbuild -CBEFORE -Q $(SUMMARYFLAGS))
-bbuild -CBEFORE --small-table $(SUMMARYFLAGS))
## Generate a codemap svg