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:
22
cli/testdata/coder_ssh_--help.golden
vendored
22
cli/testdata/coder_ssh_--help.golden
vendored
@ -1,47 +1,47 @@
|
||||
coder v0.0.0-devel
|
||||
|
||||
[93mUSAGE:[0m
|
||||
USAGE:
|
||||
coder ssh [flags] <workspace>
|
||||
|
||||
Start a shell into a workspace
|
||||
|
||||
[93mOPTIONS:[0m
|
||||
[96m-[0m[96mA[0m, [96m--[0m[96mforward-agent[0m bool, [96m$CODER_SSH_FORWARD_AGENT[0m
|
||||
OPTIONS:
|
||||
-A, --forward-agent bool, $CODER_SSH_FORWARD_AGENT
|
||||
Specifies whether to forward the SSH agent specified in
|
||||
$SSH_AUTH_SOCK.
|
||||
|
||||
[96m-[0m[96mG[0m, [96m--[0m[96mforward-gpg[0m bool, [96m$CODER_SSH_FORWARD_GPG[0m
|
||||
-G, --forward-gpg bool, $CODER_SSH_FORWARD_GPG
|
||||
Specifies whether to forward the GPG agent. Unsupported on Windows
|
||||
workspaces, but supports all clients. Requires gnupg (gpg, gpgconf) on
|
||||
both the client and workspace. The GPG agent must already be running
|
||||
locally and will not be started for you. If a GPG agent is already
|
||||
running in the workspace, it will be attempted to be killed.
|
||||
|
||||
[96m--[0m[96midentity-agent[0m string, [96m$CODER_SSH_IDENTITY_AGENT[0m
|
||||
--identity-agent string, $CODER_SSH_IDENTITY_AGENT
|
||||
Specifies which identity agent to use (overrides $SSH_AUTH_SOCK),
|
||||
forward agent must also be enabled.
|
||||
|
||||
[96m-[0m[96ml[0m, [96m--[0m[96mlog-dir[0m string, [96m$CODER_SSH_LOG_DIR[0m
|
||||
-l, --log-dir string, $CODER_SSH_LOG_DIR
|
||||
Specify the directory containing SSH diagnostic log files.
|
||||
|
||||
[96m--[0m[96mno-wait[0m bool, [96m$CODER_SSH_NO_WAIT[0m
|
||||
--no-wait bool, $CODER_SSH_NO_WAIT
|
||||
Enter workspace immediately after the agent has connected. This is the
|
||||
default if the template has configured the agent startup script
|
||||
behavior as non-blocking.
|
||||
DEPRECATED: Use --wait instead.
|
||||
|
||||
[96m-[0m[96mR[0m, [96m--[0m[96mremote-forward[0m string, [96m$CODER_SSH_REMOTE_FORWARD[0m
|
||||
-R, --remote-forward string, $CODER_SSH_REMOTE_FORWARD
|
||||
Enable remote port forwarding (remote_port:local_address:local_port).
|
||||
|
||||
[96m--[0m[96mstdio[0m bool, [96m$CODER_SSH_STDIO[0m
|
||||
--stdio bool, $CODER_SSH_STDIO
|
||||
Specifies whether to emit SSH output over stdin/stdout.
|
||||
|
||||
[96m--[0m[96mwait[0m yes|no|auto, [96m$CODER_SSH_WAIT[0m (default: auto)
|
||||
--wait yes|no|auto, $CODER_SSH_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[96mworkspace-poll-interval[0m duration, [96m$CODER_WORKSPACE_POLL_INTERVAL[0m (default: 1m)
|
||||
--workspace-poll-interval duration, $CODER_WORKSPACE_POLL_INTERVAL (default: 1m)
|
||||
Specifies how often to poll for workspace automated shutdown.
|
||||
|
||||
———
|
||||
|
Reference in New Issue
Block a user