8000 coder/scaletest at 762cb84f4a59b99e95b5bb7524d0830b611f6df4 · dannynoncoder/coder · GitHub
[go: up one dir, main page]

Skip to content
< 95FD script type="application/json" data-target="react-app.embeddedData">{"payload":{"allShortcutsEnabled":false,"path":"scaletest","repo":{"id":807995949,"defaultBranch":"main","name":"coder","ownerLogin":"dannynoncoder","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2024-05-30T07:17:04.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/171226583?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"762cb84f4a59b99e95b5bb7524d0830b611f6df4","listCacheKey":"v0:1717053567.0","canEdit":false,"refType":"tree","currentOid":"762cb84f4a59b99e95b5bb7524d0830b611f6df4"},"tree":{"items":[{"name":"agentconn","path":"scaletest/agentconn","contentType":"directory"},{"name":"createworkspaces","path":"scaletest/createworkspaces","contentType":"directory"},{"name":"dashboard","path":"scaletest/dashboard","contentType":"directory"},{"name":"harness","path":"scaletest/harness","contentType":"directory"},{"name":"lib","path":"scaletest/lib","contentType":"directory"},{"name":"loadtestutil","path":"scaletest/loadtestutil","contentType":"directory"},{"name":"placebo","path":"scaletest/placebo","contentType":"directory"},{"name":"reconnectingpty","path":"scaletest/reconnectingpty","contentType":"directory"},{"name":"setup","path":"scaletest/setup","contentType":"directory"},{"name":"templates","path":"scaletest/templates","contentType":"directory"},{"name":"terraform","path":"scaletest/terraform","contentType":"directory"},{"name":"workspacebuild","path":"scaletest/workspacebuild","contentType":"directory"},{"name":"workspacetraffic","path":"scaletest/workspacetraffic","contentType":"directory"},{"name":"README.md","path":"scaletest/README.md","contentType":"file"},{"name":"scaletest.sh","path":"scaletest/scaletest.sh","contentType":"file"},{"name":"scaletest_dashboard.json","path":"scaletest/scaletest_dashboard.json","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eScale Testing\u003c/h1\u003e\u003ca id=\"user-content-scale-testing\" class=\"anchor\" aria-label=\"Permalink: Scale Testing\" href=\"#scale-testing\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThis folder contains CLI commands, Terraform code, and scripts to aid in performing load tests of Coder.\nAt a high level, it performs the following steps:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eUsing the Terraform code in \u003ccode\u003e./terraform\u003c/code\u003e, stands up a preconfigured Google Cloud environment\nconsisting of a VPC, GKE Cluster, and CloudSQL instance.\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote: You must have an existing Google Cloud project available.\u003c/strong\u003e\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c/li\u003e\n\u003cli\u003eCreates a dedicated namespace for Coder and installs Coder using the Helm chart in this namespace.\u003c/li\u003e\n\u003cli\u003eConfigures the Coder deployment with random credentials and a predefined Kubernetes template.\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote:\u003c/strong\u003e These credentials are stored in \u003ccode\u003e${PROJECT_ROOT}/scaletest/.coderv2/coder.env\u003c/code\u003e.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c/li\u003e\n\u003cli\u003eCreates a number of workspaces and waits for them to all start successfully. These workspaces\nare ephemeral and do not contain any persistent resources.\u003c/li\u003e\n\u003cli\u003eWaits for 10 minutes to allow things to settle and establish a baseline.\u003c/li\u003e\n\u003cli\u003eGenerates web terminal traffic to all workspaces for 30 minutes.\u003c/li\u003e\n\u003cli\u003eDirectly after traffic generation, captures goroutine and heap snapshots of the Coder deployment.\u003c/li\u003e\n\u003cli\u003eTears down all resources (unless \u003ccode\u003e--skip-cleanup\u003c/code\u003e is specified).\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUsage\u003c/h2\u003e\u003ca id=\"user-content-usage\" class=\"anchor\" aria-label=\"Permalink: Usage\" href=\"#usage\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe main entrypoint is the \u003ccode\u003escaletest.sh\u003c/code\u003e script.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-text-shell-session notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$ scaletest.sh --help\nUsage: scaletest.sh --name \u0026lt;name\u0026gt; --project \u0026lt;project\u0026gt; --num-workspaces \u0026lt;num-workspaces\u0026gt; --scenario \u0026lt;scenario\u0026gt; [--dry-run] [--skip-cleanup]\"\u003e\u003cpre\u003e$ \u003cspan class=\"pl-s1\"\u003escaletest.sh --help\u003c/span\u003e\n\u003cspan class=\"pl-c1\"\u003eUsage: scaletest.sh --name \u0026lt;name\u0026gt; --project \u0026lt;project\u0026gt; --num-workspaces \u0026lt;num-workspaces\u0026gt; --scenario \u0026lt;scenario\u0026gt; [--dry-run] [--skip-cleanup]\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eRequired arguments:\u003c/h3\u003e\u003ca id=\"user-content-required-arguments\" class=\"anchor\" aria-label=\"Permalink: Required arguments:\" href=\"#required-arguments\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003e--name\u003c/code\u003e: Name for the loadtest. This is added as a prefix to resources created by Terraform (e.g. \u003ccode\u003ejoe-big-loadtest\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e--project\u003c/code\u003e: Google Cloud project in which to create the resources (example: \u003ccode\u003emy-loadtest-project\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e--num-workspaces\u003c/code\u003e: Number of workspaces to create (example: \u003ccode\u003e10\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e--scenario\u003c/code\u003e: Deployment scenario to use (example: \u003ccode\u003esmall\u003c/code\u003e). See \u003ccode\u003eterraform/scenario-*.tfvars\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote:\u003c/strong\u003e In order to capture Prometheus metrics, you must define the environment variables\n\u003ccode\u003eSCALETEST_PROMETHEUS_REMOTE_WRITE_USER\u003c/code\u003e and \u003ccode\u003eSCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD\u003c/code\u003e.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eOptional arguments:\u003c/h3\u003e\u003ca id=\"user-content-optional-arguments\" class=\"anchor\" aria-label=\"Permalink: Optional arguments:\" href=\"#optional-arguments\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003e--dry-run\u003c/code\u003e: Do not perform any action and instead print what would be executed.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e--skip-cleanup\u003c/code\u003e: Do not perform any cleanup. You will be responsible for deleting any resources this creates.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eEnvironment Variables\u003c/h3\u003e\u003ca id=\"user-content-environment-variables\" class=\"anchor\" aria-label=\"Permalink: Environment Variables\" href=\"#environment-variables\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eAll of the above arguments may be specified as environment variables. Consult the script for details.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003ePrometheus Metrics\u003c/h3\u003e\u003ca id=\"user-content-prometheus-metrics\" class=\"anchor\" aria-label=\"Permalink: Prometheus Metrics\" href=\"#prometheus-metrics\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo capture Prometheus metrics from the loadtest, two environment variables are required:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003eSCALETEST_PROMETHEUS_REMOTE_WRITE_USER\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003eSCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eEnterprise License\u003c/h3\u003e\u003ca id=\"user-content-enterprise-license\" class=\"anchor\" aria-label=\"Permalink: Enterprise License\" href=\"#enterprise-license\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo add an Enterprise license, set the \u003ccode\u003eSCALETEST_CODER_LICENSE\u003c/code\u003e environment variable to the JWT string\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eScenarios\u003c/h2\u003e\u003ca id=\"user-content-scenarios\" class=\"anchor\" aria-label=\"Permalink: Scenarios\" href=\"#scenarios\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eA scenario defines a number of variables that override the default Terraform variables.\nA number of existing scenarios are provided in \u003ccode\u003escaletest/terraform/scenario-*.tfvars\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor example, \u003ccode\u003escenario-small.tfvars\u003c/code\u003e includes the following variable definitions:\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"nodepool_machine_type_coder = \u0026quot;t2d-standard-2\u0026quot;\nnodepool_machine_type_workspaces = \u0026quot;t2d-standard-2\u0026quot;\ncoder_cpu = \u0026quot;1000m\u0026quot; # Leaving 1 CPU for system workloads\ncoder_mem = \u0026quot;4Gi\u0026quot; # Leaving 4GB for system workloads\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode\u003enodepool_machine_type_coder = \"t2d-standard-2\"\nnodepool_machine_type_workspaces = \"t2d-standard-2\"\ncoder_cpu = \"1000m\" # Leaving 1 CPU for system workloads\ncoder_mem = \"4Gi\" # Leaving 4GB for system workloads\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTo create your own scenario, simply add a new file \u003ccode\u003eterraform/scenario-$SCENARIO_NAME.tfvars\u003c/code\u003e.\nIn this file, override variables as required, consulting \u003ccode\u003evars.tf\u003c/code\u003e as needed.\nYou can then use this scenario by specifying \u003ccode\u003e--scenario $SCENARIO_NAME\u003c/code\u003e.\nFor example, if your scenario file were named \u003ccode\u003escenario-big-whopper2x.tfvars\u003c/code\u003e, you would specify\n\u003ccode\u003e--scenario=big-whopper2x\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUtility scripts\u003c/h2\u003e\u003ca id=\"user-content-utility-scripts\" class=\"anchor\" aria-label=\"Permalink: Utility scripts\" href=\"#utility-scripts\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eA number of utility scripts are provided in \u003ccode\u003elib\u003c/code\u003e, and are used by \u003ccode\u003escaletest.sh\u003c/code\u003e:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003ecoder_shim.sh\u003c/code\u003e: a convenience script to run the \u003ccode\u003ecoder\u003c/code\u003e binary with a predefined config root.\nThis is intended to allow running Coder CLI commands against the loadtest cluster without\nmodifying a user's existing Coder CLI configuration.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ecoder_init.sh\u003c/code\u003e: Performs first-time user setup of an existing Coder instance, generating\na random password for the admin user. The admin user is named \u003ccode\u003eadmin@coder.com\u003c/code\u003e by default.\nCredentials are written to \u003ccode\u003escaletest/.coderv2/coder.env\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003ecoder_workspacetraffic.sh\u003c/code\u003e: Runs traffic generation against the loadtest cluster and creates\na monitoring manifest for the traffic generation pod. This pod will restart automatically\nafter the traffic generation has completed.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGrafana Dashboard\u003c/h2\u003e\u003ca id=\"user-content-grafana-dashboard\" class=\"anchor\" aria-label=\"Permalink: Grafana Dashboard\" href=\"#grafana-dashboard\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eA sample Grafana dashboard is provided in \u003ccode\u003escaletest_dashboard.json\u003c/code\u003e. This dashboard is intended\nto be imported into an existing Grafana instance. It provides a number of useful metrics:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003cstrong\u003eControl Plane Resources\u003c/strong\u003e: CPU, memory, and network usage for the Coder deployment, as well as the number of pod restarts.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eDatabase\u003c/strong\u003e: Rows inserted/updated/deleted/returned, active connections, and transactions per second. Fine-grained \u003ccode\u003esqlQuerier\u003c/code\u003e metrics are provided for Coder's database as well, broken down my query method.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eHTTP requests\u003c/strong\u003e: Number of HTTP requests per second, broken down by status code and path.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eWorkspace Resources\u003c/strong\u003e: CPU, memory, and network usage for all workspaces.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eWorkspace Agents\u003c/strong\u003e: Workspace agent network usage, connection latency, and number of active connections.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eWorkspace Traffic\u003c/strong\u003e: Statistics related to workspace traffic generation.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eInternals\u003c/strong\u003e: Provisioner job timings, concurrency, workspace builds, and AuthZ duration.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003eA subset of these metrics may be useful for a production deployment, but some are only useful\nfor load testing.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNote:\u003c/strong\u003e in particular, \u003ccode\u003esqlQuerier\u003c/code\u003e metrics produce a large number of time series and may cause\nincreased charges in your metrics provider.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c/article\u003e","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"Scale Testing","anchor":"scale-testing","htmlText":"Scale Testing"},{"level":2,"text":"Usage","anchor":"usage","htmlText":"Usage"},{"level":3,"text":"Required arguments:","anchor":"required-arguments","htmlText":"Required arguments:"},{"level":3,"text":"Optional arguments:","anchor":"optional-arguments","htmlText":"Optional arguments:"},{"level":3,"text":"Environment Variables","anchor":"environment-variables","htmlText":"Environment Variables"},{"level":3,"text":"Prometheus Metrics","anchor":"prometheus-metrics","htmlText":"Prometheus Metrics"},{"level":3,"text":"Enterprise License","anchor":"enterprise-license","htmlText":"Enterprise License"},{"level":2,"text":"Scenarios","anchor":"scenarios","htmlText":"Scenarios"},{"level":2,"text":"Utility scripts","anchor":"utility-scripts","htmlText":"Utility scripts"},{"level":2,"text":"Grafana Dashboard","anchor":"grafana-dashboard","htmlText":"Grafana Dashboard"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fdannynoncoder%2Fcoder%2Ftree%2F762cb84f4a59b99e95b5bb7524d0830b611f6df4%2Fscaletest"}},"totalCount":16,"showBranchInfobar":false},"fileTree":{"":{"items":[{"name":".devcontainer","path":".devcontainer","contentType":"directory"},{"name":".github","path":".github","contentType":"directory"},{"name":".vscode","path":".vscode","contentType":"directory"},{"name":"agent","path":"agent","contentType":"directory"},{"name":"apiversion","path":"apiversion","contentType":"directory"},{"name":"buildinfo","path":"buildinfo","contentType":"directory"},{"name":"cli","path":"cli","contentType":"directory"},{"name":"cmd","path":"cmd","contentType":"directory"},{"name":"coderd","path":"coderd","contentType":"directory"},{"name":"codersdk","path":"codersdk","contentType":"directory"},{"name":"cryptorand","path":"cryptorand","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"dogfood","path":"dogfood","contentType":"directory"},{"name":"enterprise","path":"enterprise","contentType":"directory"},{"name":"examples","path":"examples","contentType":"directory"},{"name":"helm","path":"helm","contentType":"directory"},{"name":"offlinedocs","path":"offlinedocs","contentType":"directory"},{"name":"provisioner","path":"provisioner","contentType":"directory"},{"name":"provisionerd","path":"provisionerd","contentType":"directory"},{"name":"provisionersdk","path":"provisionersdk","contentType":"directory"},{"name":"pty","path":"pty","contentType":"directory"},{"name":"scaletest","path":"scaletest","contentType":"directory"},{"name":"scripts","path":"scripts","contentType":"directory"},{"name":"site","path":"site","contentType":"directory"},{"name":"support","path":"support","contentType":"directory"},{"name":"tailnet","path":"tailnet","contentType":"directory"},{"name":"testutil","path":"testutil","contentType":"directory"},{"name":".dockerignore","path":".dockerignore","contentType":"file"},{"name":".editorconfig","path":".editorconfig","contentType":"file"},{"name":".git-blame-ignore-revs","path":".git-blame-ignore-revs","contentType":"file"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".golangci.yaml","path":".golangci.yaml","contentType":"file"},{"name":".prettierignore","path":".prettierignore","contentType":"file"},{"name":".prettierignore.include","path":".prettierignore.include","contentType":"file"},{"name":".prettierrc.yaml","path":".prettierrc.yaml","contentType":"file"},{"name":".swaggo","path":".swaggo","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"LICENSE.enterprise","path":"LICENSE.enterprise","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"SECURITY.md","path":"SECURITY.md","contentType":"file"},{"name":"coder.env","path":"coder.env","contentType":"file"},{"name":"docker-compose.yaml","path":"docker-compose.yaml","contentType":"file"},{"name":"flake.lock","path":"flake.lock","contentType":"file"},{"name":"flake.nix","path":"flake.nix","contentType":"file"},{"name":"go.mod","path":"go.mod","contentType":"file"},{"name":"go.sum","path":"go.sum","contentType":"file"},{"name":"install.sh","path":"install.sh","contentType":"file"},{"name":"package.json","path":"package.json","contentType":"file"},{"name":"pnpm-lock.yaml","path":"pnpm-lock.yaml","contentType":"file"},{"name":"release.key","path":"release.key","contentType":"file"},{"name":"shell.nix","path":"shell.nix","contentType":"file"}],"totalCount":53}},"fileTreeProcessingTime":9.256474,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/dannynoncoder/coder/branches":{"post":"FcHen1K0V0mOz5b33sLX4WwmBJAHLrv-hAOix3TkmYY-FYy62ura9iOIoN8eQ3333oAlejSvbSli4_Cyc44Vcw"}}},"title":"coder/scaletest at 762cb84f4a59b99e95b5bb7524d0830b611f6df4 · dannynoncoder/coder","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-b84e9496fc59.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0