feat(cli): add trafficgen command for load testing (#7307)

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.
This commit is contained in:
Cian Johnston
2023-05-05 10:34:58 +01:00
committed by GitHub
parent a172e073e3
commit 08fb9a6f1b
11 changed files with 787 additions and 79 deletions
+3 -3
View File
@@ -165,9 +165,9 @@ type WorkspaceAgentReconnectingPTYInit struct {
// to pipe data to a PTY.
// @typescript-ignore ReconnectingPTYRequest
type ReconnectingPTYRequest struct {
Data string `json:"data"`
Height uint16 `json:"height"`
Width uint16 `json:"width"`
Data string `json:"data,omitempty"`
Height uint16 `json:"height,omitempty"`
Width uint16 `json:"width,omitempty"`
}
// ReconnectingPTY spawns a new reconnecting terminal session.