This PR adds a scaletest workspace-traffic command for load testing. This opens a
ReconnectingPTY connection to each scaletest workspace (via coderd) and
concurrently writes and reads random data to/from the PTY. Payloads are of the
form #${RANDOM_ALPHANUMERIC_STRING}, which essentially drops garbage
comments in the remote shell, and should not result in any commands being executed.
5.6 KiB
scaletest workspace-traffic
Generate traffic to scaletest workspaces through coderd
Usage
coder scaletest workspace-traffic [flags]
Options
--bytes-per-tick
| Type | int |
| Environment | $CODER_SCALETEST_WORKSPACE_TRAFFIC_BYTES_PER_TICK |
| Default | 1024 |
How much traffic to generate per tick.
--cleanup-concurrency
| Type | int |
| Environment | $CODER_SCALETEST_CLEANUP_CONCURRENCY |
| Default | 1 |
Number of concurrent cleanup jobs to run. 0 means unlimited.
--cleanup-job-timeout
| Type | duration |
| Environment | $CODER_SCALETEST_CLEANUP_JOB_TIMEOUT |
| Default | 5m |
Timeout per job. Jobs may take longer to complete under higher concurrency limits.
--cleanup-timeout
| Type | duration |
| Environment | $CODER_SCALETEST_CLEANUP_TIMEOUT |
| Default | 30m |
Timeout for the entire cleanup run. 0 means unlimited.
--concurrency
| Type | int |
| Environment | $CODER_SCALETEST_CONCURRENCY |
| Default | 1 |
Number of concurrent jobs to run. 0 means unlimited.
--job-timeout
| Type | duration |
| Environment | $CODER_SCALETEST_JOB_TIMEOUT |
| Default | 5m |
Timeout per job. Jobs may take longer to complete under higher concurrency limits.
--output
| Type | string-array |
| Environment | $CODER_SCALETEST_OUTPUTS |
| Default | text |
Output format specs in the format "[:]". Not specifying a path will default to stdout. Available formats: text, json.
--tick-interval
| Type | duration |
| Environment | $CODER_SCALETEST_WORKSPACE_TRAFFIC_TICK_INTERVAL |
| Default | 100ms |
How often to send traffic.
--timeout
| Type | duration |
| Environment | $CODER_SCALETEST_TIMEOUT |
| Default | 30m |
Timeout for the entire test run. 0 means unlimited.
--trace
| Type | bool |
| Environment | $CODER_SCALETEST_TRACE |
Whether application tracing data is collected. It exports to a backend configured by environment variables. See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md.
--trace-coder
| Type | bool |
| Environment | $CODER_SCALETEST_TRACE_CODER |
Whether opentelemetry traces are sent to Coder. We recommend keeping this disabled unless we advise you to enable it.
--trace-honeycomb-api-key
| Type | string |
| Environment | $CODER_SCALETEST_TRACE_HONEYCOMB_API_KEY |
Enables trace exporting to Honeycomb.io using the provided API key.
--trace-propagate
| Type | bool |
| Environment | $CODER_SCALETEST_TRACE_PROPAGATE |
Enables trace propagation to the Coder backend, which will be used to correlate server-side spans with client-side spans. Only enable this if the server is configured with the exact same tracing configuration as the client.