feat(cli): add --benchmark switch

This commit is contained in:
Henrik Lissner 2022-09-06 21:42:13 +02:00
parent 4009509db5
commit aef14f078d
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
2 changed files with 6 additions and 1 deletions

View file

@ -172,6 +172,7 @@ SEE ALSO:
(emacsdir ("--emacsdir" dir) "Use Doom install living in `DIR' (e.g. ~/.emacs.d)")
(pager ("--pager" cmd) "Pager command to use for large output")
(profile ("--profile" name) "Use profile named NAME")
(bench? ("--benchmark") "Always display the benchmark")
&flags
(color? ("--color") "Whether or not to show ANSI color codes")
&multiple
@ -191,6 +192,8 @@ SEE ALSO:
Warning: files loaded this way load too late to define new commands. To
define commands, do so from `$DOOMDIR'/cli.el, `$DOOMDIR'/init.el, or a
.doomrc file in the current project tree."
(when bench?
(setq doom-cli-benchmark-threshold 'always))
(when color?
(setq doom-print-backend (if (eq color? :yes) 'ansi)))
(when pager