-
Notifications
You must be signed in to change notification settings - Fork 887
feat: add load testing harness, coder loadtest command #4853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
id := strconv.Itoa(i) | ||
runner, err := t.NewRunner(client) | ||
if err != nil { | ||
return xerrors.Errorf("create %q runner for %s/%s: %w", t.Type, name, id, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name string already has the id in it right? Seems redundant to include it again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name is the name of the test e.g. workspacebuild-0
and the id is the iteration of the test e.g. 0, 1, 2, 3, etc.
I reused the i
variable in the two loops which makes this hard to read, so I've changed the inner loop to j
to make it easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah
@@ -70,33 +70,35 @@ func init() { | |||
} | |||
|
|||
func Core() []*cobra.Command { | |||
// Please re-sort this list alphabetically if you change it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true
httpapi.Duration
which wrapstime.Duration
with sensible JSON marshaling and unmarshalingloadtest/harness
package with tests which is the overall runner of a collection of testsloadtest/placebo
which has an implementation ofharness.Runnable
that sleeps for a given duration with jitter and failure chanceloadtest/workspacebuild
which has an implementation ofharness.Runnable
that builds a workspace, waits for it to become availableharness.Cleanable
to delete the workspace on test completioncoder loadtest
subcommand which is only available to the site ownerTODO (in future PRs):
Example