Skip to content

Run performance tests #1359

Run performance tests

Run performance tests #1359

name: Run performance tests
on:
schedule:
- cron: "0 23 * * *"
workflow_dispatch:
env:
DOCKER_BUILDKIT: 1
KOSKI_SERVER_COUNT: 2
KOSKI_USER: ${{ secrets.KOSKI_USER_USERNAME }}
KOSKI_PASS: ${{ secrets.KOSKI_USER_PASSWORD }}
TILASTOKESKUS_USER: ${{ secrets.TILASTOKESKUS_PERFTEST_USER }}
TILASTOKESKUS_PASS: ${{ secrets.TILASTOKESKUS_PERFTEST_PASS }}
KOSKI_BASE_URL: https://koski.testiopintopolku.fi/koski
VIRKAILIJA: https://virkailija.testiopintopolku.fi
jobs:
random_get_light:
name: random-get-light
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Java 11
uses: actions/setup-java@v3
with:
java-version: "11"
architecture: "x64"
distribution: "zulu"
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build
run: mvn test-compile
- name: Run perftest randomget-light
run: |
export PERFTEST_THREADS=2
mvn exec:java -Dexec.mainClass="fi.oph.koski.perftest.RandomOpiskeluoikeusGetter"
- name: Report failure
uses: ravsamhq/notify-slack-action@95a35215cdf7ab510d2cdd20ae94f342d212a1a1
if: ${{ failure() }}
with:
status: ${{ job.status }}
notification_title: "Run performance tests: failure in randomget-light"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
insert_light:
needs: [random_get_light]
name: insert-light
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Java 11
uses: actions/setup-java@v3
with:
java-version: "11"
architecture: "x64"
distribution: "zulu"
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build
run: mvn test-compile
- name: Run perftest insert-light
run: |
export PERFTEST_THREADS=4
mvn exec:java -Dexec.mainClass="fi.oph.koski.perftest.MixedOpiskeluoikeusInserterUpdater"
- name: Report failure
uses: ravsamhq/notify-slack-action@95a35215cdf7ab510d2cdd20ae94f342d212a1a1
if: ${{ failure() }}
with:
status: ${{ job.status }}
notification_title: "Run performance tests: failure in insert-light"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
mixed-overload:
needs: [insert_light]
name: mixed-overload
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Java 11
uses: actions/setup-java@v3
with:
java-version: "11"
architecture: "x64"
distribution: "zulu"
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build
run: mvn test-compile
- name: Run perftest mixed-overload
run: |
export PERFTEST_THREADS=100
mvn exec:java -Dexec.mainClass="fi.oph.koski.perftest.MixedPerfTester"
- name: Report failure
uses: ravsamhq/notify-slack-action@95a35215cdf7ab510d2cdd20ae94f342d212a1a1
if: ${{ failure() }}
with:
status: ${{ job.status }}
notification_title: "Run performance tests: failure in mixed-overload"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
valpas-organisaatio-listaus:
needs: [insert_light]
name: valpas-organisaatio-listaus
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Java 11
uses: actions/setup-java@v3
with:
java-version: "11"
architecture: "x64"
distribution: "zulu"
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build
run: mvn test-compile
- name: Run perftest valpas-organisaatio-listaus
run: |
export PERFTEST_THREADS=30
export PERFTEST_ROUNDS=1700
export WARMUP_ROUNDS=50
export PERFTEST_SUCCESS_THRESHOLD_PERCENTAGE=98
export KOSKI_VALPAS_ORGANISAATIOT_FILENAME="valpas_qa_peruskoulujen_ja_oppijoiden_oidit.txt"
mvn exec:java -Dexec.mainClass="fi.oph.koski.perftest.ValpasRandomPerusopetuksenOppilaitoksetGetter"
- name: Report failure
uses: ravsamhq/notify-slack-action@95a35215cdf7ab510d2cdd20ae94f342d212a1a1
if: ${{ failure() }}
with:
status: ${{ job.status }}
notification_title: "Run performance tests: failure in valpas-organisaatio-listaus"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
valpas-oppija-detaalit:
needs: [insert_light]
name: valpas-oppija-detaalit
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Java 11
uses: actions/setup-java@v3
with:
java-version: "11"
architecture: "x64"
distribution: "zulu"
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build
run: mvn test-compile
- name: Run perftest valpas-oppija-detaalit
run: |
export PERFTEST_THREADS=30
export PERFTEST_ROUNDS=5000
export WARMUP_ROUNDS=50
export PERFTEST_SUCCESS_THRESHOLD_PERCENTAGE=98
export KOSKI_VALPAS_OPPIJAOIDIT_FILENAME="valpas_qa_oppija_oidit.txt"
mvn exec:java -Dexec.mainClass="fi.oph.koski.perftest.ValpasRandomPerusopetuksenOppijaGetter"
- name: Report failure
uses: ravsamhq/notify-slack-action@95a35215cdf7ab510d2cdd20ae94f342d212a1a1
if: ${{ failure() }}
with:
status: ${{ job.status }}
notification_title: "Run performance tests: failure in valpas-oppija-detaalit"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}