Skip to content

Commit

Permalink
setup
Browse files Browse the repository at this point in the history
  • Loading branch information
clauyan committed Nov 19, 2024
1 parent b825bcb commit 2343f33
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/trigger-loadtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
description: "Branch to take test code and helm/cron setup from"
required: false
type: string
default: main
default: "SPSH-1390"
branch_img:
description: "Branch to take Dockerfile/img from"
required: false
Expand All @@ -23,7 +23,7 @@ on:
description: "sets CONFIG env var used as k6 input"
required: false
type: string
default: "debug"
default: "plateau"
max_vus:
description: "sets the maximum number of virtual users"
required: false
Expand All @@ -33,12 +33,12 @@ on:
description: "name of test scenario defined in values.yaml"
type: string
required: true
default: dev-scenario
default: prod-scenario
execute:
description: "execute cronjob scenario after install"
type: boolean
required: true
default: false
default: true

jobs:
install_loadtest:
Expand Down
7 changes: 3 additions & 4 deletions charts/schulportal-load-tests/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ cronjobs:
serviceName: staging-scenario
spsh_base: "https://spsh.staging.spsh.dbildungsplattform.de"
kc_base: "https://keycloak.staging.spsh.dbildungsplattform.de"
# prod-scenario:
# serviceName: prod-scenario
# image: ghcr.io/dbildungsplattform/schulportal-load-tests:latest
# environment: spsh.dbildungsplattform.de
prod-scenario:
serviceName: prod-scenario
spsh_base: "https://spsh.dbildungsplattform.de"
12 changes: 12 additions & 0 deletions loadtest/util/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export enum CONFIG {
SPIKE = "spike",
STRESS = "stress",
BREAKPOINT = "breakpoint",
PLATEAU = "plateau",
DEBUG = "debug",
}
export function getConfig(): CONFIG {
Expand Down Expand Up @@ -48,6 +49,17 @@ export function getDefaultOptions() {
http_req_duration: [{ threshold: "p(95)<5000", abortOnFail: true }],
},
};
case CONFIG.PLATEAU:
return {
stages: [
// ramp up
{ duration: "1m", target: maxVUs },
// plateau
{ duration: "5m", target: maxVUs },
// ramp down
{ duration: "1m", target: 0 },
],
};
case CONFIG.DEBUG:
return {
stages: [{ duration: "1s", target: maxVUs }],
Expand Down

0 comments on commit 2343f33

Please sign in to comment.