Skip to content

Commit 2574a00

Browse files
committed
use strategy.timeout instead of duration
1 parent b9c845f commit 2574a00

File tree

4 files changed

+2
-23
lines changed

4 files changed

+2
-23
lines changed

cli/scaletest.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,6 @@ func (r *RootCmd) scaletestCreateWorkspaces() *clibase.Cmd {
896896

897897
func (r *RootCmd) scaletestWorkspaceTraffic() *clibase.Cmd {
898898
var (
899-
duration time.Duration
900899
tickInterval time.Duration
901900
bytesPerTick int64
902901
client = &codersdk.Client{}
@@ -977,7 +976,7 @@ func (r *RootCmd) scaletestWorkspaceTraffic() *clibase.Cmd {
977976
config := workspacetraffic.Config{
978977
AgentID: agentID,
979978
BytesPerTick: bytesPerTick,
980-
Duration: duration,
979+
Duration: strategy.timeout,
981980
TickInterval: tickInterval,
982981
}
983982

@@ -1021,13 +1020,6 @@ func (r *RootCmd) scaletestWorkspaceTraffic() *clibase.Cmd {
10211020
}
10221021

10231022
cmd.Options = []clibase.Option{
1024-
{
1025-
Flag: "duration",
1026-
Env: "CODER_SCALETEST_WORKSPACE_TRAFFIC_DURATION",
1027-
Default: "10s",
1028-
Description: "How long to generate traffic for.",
1029-
Value: clibase.DurationOf(&duration),
1030-
},
10311023
{
10321024
Flag: "bytes-per-tick",
10331025
Env: "CODER_SCALETEST_WORKSPACE_TRAFFIC_BYTES_PER_TICK",

cli/scaletest_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func TestScaleTestWorkspaceTraffic(t *testing.T) {
260260
coderdtest.AwaitWorkspaceAgents(t, client, ws.ID)
261261

262262
inv, root := clitest.New(t, "scaletest", "workspace-traffic",
263-
"--duration", "1s",
263+
"--timeout", "1s",
264264
"--bytes-per-tick", "1024",
265265
"--tick-interval", "100ms",
266266
)

cli/testdata/coder_scaletest_workspace-traffic_--help.golden

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ Generate traffic to scaletest workspaces through coderd
1919
--concurrency int, $CODER_SCALETEST_CONCURRENCY (default: 1)
2020
Number of concurrent jobs to run. 0 means unlimited.
2121

22-
--duration duration, $CODER_SCALETEST_WORKSPACE_TRAFFIC_DURATION (default: 10s)
23-
How long to generate traffic for.
24-
2522
--job-timeout duration, $CODER_SCALETEST_JOB_TIMEOUT (default: 5m)
2623
Timeout per job. Jobs may take longer to complete under higher
2724
concurrency limits.

docs/cli/scaletest_workspace-traffic.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,6 @@ Timeout for the entire cleanup run. 0 means unlimited.
6262

6363
Number of concurrent jobs to run. 0 means unlimited.
6464

65-
### --duration
66-
67-
| | |
68-
| ----------- | -------------------------------------------------------- |
69-
| Type | <code>duration</code> |
70-
| Environment | <code>$CODER_SCALETEST_WORKSPACE_TRAFFIC_DURATION</code> |
71-
| Default | <code>10s</code> |
72-
73-
How long to generate traffic for.
74-
7565
### --job-timeout
7666

7767
| | |

0 commit comments

Comments
 (0)