loadgen
A load generator (framework) for Gitpod.
Note: this is a development tool only - there's no support for this.
You can find a short explanation of this tool in this loom video.
How to run a benchmark
Ensure your kubeconfig has the configuration for the cluster you want to benchmark. You can use kubecdl to update your kubeconfig with the cluster information
Fetch the TLS config from ws-manager
Port-forward ws-manager
Compile loadgen
Now you can start the benchmark with loadgen. If you want to keep the workspaces around after testing, add
--interactive
. Loadgen will then ask you before taking any destructive action. If you do not specify--interative
loadgen will wait 2 minutes before workspaces are deleted. The config file located at the./dev/loadgen/configs
folder.
In order to configure the benchmark, you can use the configuration file
Parameter | Description |
---|---|
workspaces | The number of workspaces that will be started during the benchmark |
ideImage | The image that will be used for the IDE |
waitForRunning | How long to wait for workspaces to enter running state |
waitForStopping | How long to wait until all workspaces are stopped |
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 |
featureFlags | The feature flag passed when creating the workspace |
repos | The repositories that will be used to create workspaces |
repo.cloneURL | The url of the repository |
repo.cloneTarget | The branch to clone from |
repo.score | The score decides how often a repository is used for the creation of a workspace |
repo.workspaceImage | The docker image that will be used for the workspace |
repo.environment | Environment variables that will only be set for this repository |
repo.workspaceClass | The workspace class to use for the workspace that will be created for this repository |
repo.auth | The authentication for the repository |
repo.auth.authUser | The user that should be used for authentication |
repo.auth.authPassword | The password that should be used for authentication |
After the benchmark has completed, the command will print where the results are stored (this will be a benchmark-result.json
file inside a unique directory under results/
). This results file contains information about every started workspace.