mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +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:
22
cli/testdata/coder_config-ssh_--help.golden
vendored
22
cli/testdata/coder_config-ssh_--help.golden
vendored
@ -1,6 +1,6 @@
|
||||
coder v0.0.0-devel
|
||||
|
||||
[93mUSAGE:[0m
|
||||
USAGE:
|
||||
coder config-ssh [flags]
|
||||
|
||||
Add an SSH Host entry for your workspaces "ssh coder.workspace"
|
||||
@ -15,40 +15,40 @@ coder v0.0.0-devel
|
||||
|
||||
$ coder config-ssh --dry-run
|
||||
|
||||
[93mOPTIONS:[0m
|
||||
[96m--[0m[96mcoder-binary-path[0m string, [96m$CODER_SSH_CONFIG_BINARY_PATH[0m
|
||||
OPTIONS:
|
||||
--coder-binary-path string, $CODER_SSH_CONFIG_BINARY_PATH
|
||||
Optionally specify the absolute path to the coder binary used in
|
||||
ProxyCommand. By default, the binary invoking this command ('config
|
||||
ssh') is used.
|
||||
|
||||
[96m-[0m[96mn[0m, [96m--[0m[96mdry-run[0m bool, [96m$CODER_SSH_DRY_RUN[0m
|
||||
-n, --dry-run bool, $CODER_SSH_DRY_RUN
|
||||
Perform a trial run with no changes made, showing a diff at the end.
|
||||
|
||||
[96m--[0m[96mforce-unix-filepaths[0m bool, [96m$CODER_CONFIGSSH_UNIX_FILEPATHS[0m
|
||||
--force-unix-filepaths bool, $CODER_CONFIGSSH_UNIX_FILEPATHS
|
||||
By default, 'config-ssh' uses the os path separator when writing the
|
||||
ssh config. This might be an issue in Windows machine that use a
|
||||
unix-like shell. This flag forces the use of unix file paths (the
|
||||
forward slash '/').
|
||||
|
||||
[96m--[0m[96mssh-config-file[0m string, [96m$CODER_SSH_CONFIG_FILE[0m (default: ~/.ssh/config)
|
||||
--ssh-config-file string, $CODER_SSH_CONFIG_FILE (default: ~/.ssh/config)
|
||||
Specifies the path to an SSH config.
|
||||
|
||||
[96m--[0m[96mssh-host-prefix[0m string, [96m$CODER_CONFIGSSH_SSH_HOST_PREFIX[0m
|
||||
--ssh-host-prefix string, $CODER_CONFIGSSH_SSH_HOST_PREFIX
|
||||
Override the default host prefix.
|
||||
|
||||
[96m-[0m[96mo[0m, [96m--[0m[96mssh-option[0m string-array, [96m$CODER_SSH_CONFIG_OPTS[0m
|
||||
-o, --ssh-option string-array, $CODER_SSH_CONFIG_OPTS
|
||||
Specifies additional SSH options to embed in each host stanza.
|
||||
|
||||
[96m--[0m[96muse-previous-options[0m bool, [96m$CODER_SSH_USE_PREVIOUS_OPTIONS[0m
|
||||
--use-previous-options bool, $CODER_SSH_USE_PREVIOUS_OPTIONS
|
||||
Specifies whether or not to keep options from previous run of
|
||||
config-ssh.
|
||||
|
||||
[96m--[0m[96mwait[0m yes|no|auto, [96m$CODER_CONFIGSSH_WAIT[0m (default: auto)
|
||||
--wait yes|no|auto, $CODER_CONFIGSSH_WAIT (default: auto)
|
||||
Specifies whether or not to wait for the startup script to finish
|
||||
executing. Auto means that the agent startup script behavior
|
||||
configured in the workspace template is used.
|
||||
|
||||
[96m-[0m[96my[0m, [96m--[0m[96myes[0m bool
|
||||
-y, --yes bool
|
||||
Bypass prompts.
|
||||
|
||||
———
|
||||
|
Reference in New Issue
Block a user