diff --git a/dev/loadgen/README.md b/dev/loadgen/README.md index 7d890d98220e78..ae4bc7a4db0b1e 100644 --- a/dev/loadgen/README.md +++ b/dev/loadgen/README.md @@ -41,6 +41,7 @@ In order to configure the benchmark, you can use the configuration file | successRate | Percentage of started workspaces that should enter running state to count as a successful run | | environment | Global environment variables that will be set for all repositories | | workspaceClass | The workspace class to use for workspaces. This setting can be overriden for individual repositories | +| workspaceTimeout | The workspace timeout value | | repoAuth | The authentication for a repository. This setting can be overriden for individual repositories | | repoAuth.authUser | The user that should be used for authentication | | repoAuth.authPassword | The password that should be used for authentication | diff --git a/dev/loadgen/cmd/benchmark.go b/dev/loadgen/cmd/benchmark.go index 7bc1a7df1d7da3..a01b1c839d8ba6 100644 --- a/dev/loadgen/cmd/benchmark.go +++ b/dev/loadgen/cmd/benchmark.go @@ -75,7 +75,7 @@ var benchmarkCommand = &cobra.Command{ Username: "foobar", }, FeatureFlags: scenario.FeatureFlags, - Timeout: "5m", + Timeout: scenario.WorkspaceTimeout, WorkspaceImage: "will-be-overriden", Envvars: scenario.Environment, Class: scenario.WorkspaceClass, @@ -191,16 +191,17 @@ func init() { } type BenchmarkScenario struct { - Workspaces int `json:"workspaces"` - IDEImage string `json:"ideImage"` - Repos []loadgen.WorkspaceCfg `json:"repos"` - Environment []*api.EnvironmentVariable `json:"environment"` - RunningTimeout string `json:"waitForRunning"` - StoppingTimeout string `json:"waitForStopping"` - SuccessRate float32 `json:"successRate"` - WorkspaceClass string `json:"workspaceClass"` - FeatureFlags []api.WorkspaceFeatureFlag `json:"featureFlags"` - RepositoryAuth *loadgen.RepositoryAuth `json:"repoAuth,omitempty"` + Workspaces int `json:"workspaces"` + IDEImage string `json:"ideImage"` + Repos []loadgen.WorkspaceCfg `json:"repos"` + Environment []*api.EnvironmentVariable `json:"environment"` + RunningTimeout string `json:"waitForRunning"` + StoppingTimeout string `json:"waitForStopping"` + SuccessRate float32 `json:"successRate"` + WorkspaceClass string `json:"workspaceClass"` + FeatureFlags []api.WorkspaceFeatureFlag `json:"featureFlags"` + RepositoryAuth *loadgen.RepositoryAuth `json:"repoAuth,omitempty"` + WorkspaceTimeout string `json:"workspaceTimeout,omitempty"` } func handleWorkspaceDeletion(timeout string, executor loadgen.Executor, canceled bool) error { diff --git a/dev/loadgen/configs/prod-benchmark-pvc.yaml b/dev/loadgen/configs/prod-benchmark-pvc.yaml index bba34ce33fefa0..87d26190b6334e 100644 --- a/dev/loadgen/configs/prod-benchmark-pvc.yaml +++ b/dev/loadgen/configs/prod-benchmark-pvc.yaml @@ -10,6 +10,7 @@ environment: - name: "THEIA_SUPERVISOR_TOKENS" value: '[{"token":"foobar","host":"gitpod-staging.com","scope":["function:getWorkspace","function:getLoggedInUser","function:getPortAuthenticationToken","function:getWorkspaceOwner","function:getWorkspaceUsers","function:isWorkspaceOwner","function:controlAdmission","function:setWorkspaceTimeout","function:getWorkspaceTimeout","function:sendHeartBeat","function:getOpenPorts","function:openPort","function:closePort","function:generateNewGitpodToken","function:takeSnapshot","function:stopWorkspace","resource:workspace::fa498dcc-0a84-448f-9666-79f297ad821a::get/update","resource:workspaceInstance::e0a17083-6a78-441a-9b97-ef90d6aff463::get/update/delete","resource:snapshot::*::create/get","resource:gitpodToken::*::create","resource:userStorage::*::create/get/update"],"expiryDate":"2020-12-01T07:55:12.501Z","reuse":2}]' workspaceClass: "g1-standard-pvc" +workspaceTimeout: 1h featureFlags: # https://github.com/gitpod-io/gitpod/blob/e437e1868072dfad1d195031a4709a254bd60dc8/components/ws-manager-api/core.proto#L596 # from core.proto: PERSISTENT_VOLUME_CLAIM = 7; diff --git a/dev/loadgen/configs/prod-benchmark.yaml b/dev/loadgen/configs/prod-benchmark.yaml index f689ae51f5f144..1b196920c3695b 100644 --- a/dev/loadgen/configs/prod-benchmark.yaml +++ b/dev/loadgen/configs/prod-benchmark.yaml @@ -10,6 +10,7 @@ environment: - name: "THEIA_SUPERVISOR_TOKENS" value: '[{"token":"foobar","host":"gitpod-staging.com","scope":["function:getWorkspace","function:getLoggedInUser","function:getPortAuthenticationToken","function:getWorkspaceOwner","function:getWorkspaceUsers","function:isWorkspaceOwner","function:controlAdmission","function:setWorkspaceTimeout","function:getWorkspaceTimeout","function:sendHeartBeat","function:getOpenPorts","function:openPort","function:closePort","function:generateNewGitpodToken","function:takeSnapshot","function:stopWorkspace","resource:workspace::fa498dcc-0a84-448f-9666-79f297ad821a::get/update","resource:workspaceInstance::e0a17083-6a78-441a-9b97-ef90d6aff463::get/update/delete","resource:snapshot::*::create/get","resource:gitpodToken::*::create","resource:userStorage::*::create/get/update"],"expiryDate":"2020-12-01T07:55:12.501Z","reuse":2}]' workspaceClass: "g1-standard" +workspaceTimeout: 1h repos: - cloneURL: https://github.com/Furisto/workspace-stress cloneTarget: main diff --git a/dev/loadgen/configs/workspace-preview-benchmark-pvc.yaml b/dev/loadgen/configs/workspace-preview-benchmark-pvc.yaml index 6b74169e4f26a9..92eacd1aa4013c 100644 --- a/dev/loadgen/configs/workspace-preview-benchmark-pvc.yaml +++ b/dev/loadgen/configs/workspace-preview-benchmark-pvc.yaml @@ -7,6 +7,7 @@ environment: - name: "THEIA_SUPERVISOR_TOKENS" value: '[{"token":"foobar","host":"gitpod-staging.com","scope":["function:getWorkspace","function:getLoggedInUser","function:getPortAuthenticationToken","function:getWorkspaceOwner","function:getWorkspaceUsers","function:isWorkspaceOwner","function:controlAdmission","function:setWorkspaceTimeout","function:getWorkspaceTimeout","function:sendHeartBeat","function:getOpenPorts","function:openPort","function:closePort","function:generateNewGitpodToken","function:takeSnapshot","function:stopWorkspace","resource:workspace::fa498dcc-0a84-448f-9666-79f297ad821a::get/update","resource:workspaceInstance::e0a17083-6a78-441a-9b97-ef90d6aff463::get/update/delete","resource:snapshot::*::create/get","resource:gitpodToken::*::create","resource:userStorage::*::create/get/update"],"expiryDate":"2020-12-01T07:55:12.501Z","reuse":2}]' workspaceClass: "" +workspaceTimeout: 1h featureFlags: # https://github.com/gitpod-io/gitpod/blob/e437e1868072dfad1d195031a4709a254bd60dc8/components/ws-manager-api/core.proto#L596 # from core.proto: PERSISTENT_VOLUME_CLAIM = 7; diff --git a/dev/loadgen/configs/workspace-preview-benchmark.yaml b/dev/loadgen/configs/workspace-preview-benchmark.yaml index 84fd69bad96cb8..41f7b16ccc4026 100644 --- a/dev/loadgen/configs/workspace-preview-benchmark.yaml +++ b/dev/loadgen/configs/workspace-preview-benchmark.yaml @@ -7,6 +7,7 @@ environment: - name: "THEIA_SUPERVISOR_TOKENS" value: '[{"token":"foobar","host":"gitpod-staging.com","scope":["function:getWorkspace","function:getLoggedInUser","function:getPortAuthenticationToken","function:getWorkspaceOwner","function:getWorkspaceUsers","function:isWorkspaceOwner","function:controlAdmission","function:setWorkspaceTimeout","function:getWorkspaceTimeout","function:sendHeartBeat","function:getOpenPorts","function:openPort","function:closePort","function:generateNewGitpodToken","function:takeSnapshot","function:stopWorkspace","resource:workspace::fa498dcc-0a84-448f-9666-79f297ad821a::get/update","resource:workspaceInstance::e0a17083-6a78-441a-9b97-ef90d6aff463::get/update/delete","resource:snapshot::*::create/get","resource:gitpodToken::*::create","resource:userStorage::*::create/get/update"],"expiryDate":"2020-12-01T07:55:12.501Z","reuse":2}]' workspaceClass: "" +workspaceTimeout: 1h repos: - cloneURL: https://github.com/Furisto/workspace-stress cloneTarget: main