mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
perf(cli): optimize CPU consumption of help pages (#9607)
This change reduces the CPU consumption of --help by ~50%. Also, this change removes ANSI escape codes from our golden files. I don't think those were worth the inability to parallelize golden file tests and global state fragility.
This commit is contained in:
16
cli/testdata/coder_create_--help.golden
vendored
16
cli/testdata/coder_create_--help.golden
vendored
@ -1,6 +1,6 @@
|
||||
coder v0.0.0-devel
|
||||
|
||||
[93mUSAGE:[0m
|
||||
USAGE:
|
||||
coder create [flags] [name]
|
||||
|
||||
Create a workspace
|
||||
@ -9,26 +9,26 @@ coder v0.0.0-devel
|
||||
|
||||
$ coder create <username>/<workspace_name>
|
||||
|
||||
[93mOPTIONS:[0m
|
||||
[96m--[0m[96mparameter[0m string-array, [96m$CODER_RICH_PARAMETER[0m
|
||||
OPTIONS:
|
||||
--parameter string-array, $CODER_RICH_PARAMETER
|
||||
Rich parameter value in the format "name=value".
|
||||
|
||||
[96m--[0m[96mrich-parameter-file[0m string, [96m$CODER_RICH_PARAMETER_FILE[0m
|
||||
--rich-parameter-file string, $CODER_RICH_PARAMETER_FILE
|
||||
Specify a file path with values for rich parameters defined in the
|
||||
template.
|
||||
|
||||
[96m--[0m[96mstart-at[0m string, [96m$CODER_WORKSPACE_START_AT[0m
|
||||
--start-at string, $CODER_WORKSPACE_START_AT
|
||||
Specify the workspace autostart schedule. Check coder schedule start
|
||||
--help for the syntax.
|
||||
|
||||
[96m--[0m[96mstop-after[0m duration, [96m$CODER_WORKSPACE_STOP_AFTER[0m
|
||||
--stop-after duration, $CODER_WORKSPACE_STOP_AFTER
|
||||
Specify a duration after which the workspace should shut down (e.g.
|
||||
8h).
|
||||
|
||||
[96m-[0m[96mt[0m, [96m--[0m[96mtemplate[0m string, [96m$CODER_TEMPLATE_NAME[0m
|
||||
-t, --template string, $CODER_TEMPLATE_NAME
|
||||
Specify a template name.
|
||||
|
||||
[96m-[0m[96my[0m, [96m--[0m[96myes[0m bool
|
||||
-y, --yes bool
|
||||
Bypass prompts.
|
||||
|
||||
———
|
||||
|
Reference in New Issue
Block a user