Skip to content

Commit

Permalink
chore(performance):tweaking of thresholds and improvements on perform…
Browse files Browse the repository at this point in the history
…ance smoketest (#1879)

<!--- Provide a general summary of your changes in the Title above -->

## Description

Tweaked som thresholds for search, up 500ms for get dialogs and get
dialog for both endusers and serviceowners.
Increased test duration from 30s to 60s to hopefully run more requests
on a warmed-up system
Set up parallelism in performance job matrix, we are not using standard
github-runners anymore
## Related Issue(s)

- #1862 

## Verification

- [x] **Your** code builds clean without any errors or warnings
- [x] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)
  • Loading branch information
dagfinno authored Feb 14, 2025
1 parent c7404ae commit 8b8f609
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 68 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci-cd-yt01.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,19 @@ jobs:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
strategy:
max-parallel: 1
max-parallel: 4
matrix:
files:
- tests/k6/tests/serviceowner/performance/serviceOwnerSearchWithThresholds.js
- tests/k6/tests/serviceowner/performance/createDialogWithThresholds.js
- tests/k6/tests/serviceowner/performance/createTransmissionsWithThresholds.js
- tests/k6/tests/enduser/performance/enduserSearchWithThresholds.js
fail-fast: false
with:
environment: yt01
apiVersion: v1
vus: 1
duration: 30s
duration: 60s
testSuitePath: ${{ matrix.files }}
parallelism: 1
breakpoint: false
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/workflow-run-k6-ci-cd-yt01.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export let options = {
duration: "30s",
thresholds: {
..._options.thresholds,
"http_req_duration{name:enduser search}": ["p(95)<300"],
"http_req_duration{name:get dialog}": ["p(95)<300"],
"http_req_duration{name:enduser search}": ["p(95)<500"],
"http_req_duration{name:get dialog}": ["p(95)<500"],
"http_req_duration{name:get dialog activities}": ["p(95)<300"],
"http_req_duration{name:get dialog activity}": ["p(95)<300"],
"http_req_duration{name:get seenlogs}": ["p(95)<300"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { default as run, options as _options } from "./serviceowner-search.js";
export { setup as setup } from '../../performancetest_common/readTestdata.js';

export let options = {
summaryTrendStats: ['avg', 'min', 'med', 'max', 'p(95)', 'p(99)', 'p(99.5)', 'p(99.9)', 'count'],
vus: 1,
duration: "30s",
thresholds: {
..._options.thresholds,
"http_req_duration{name:serviceowner search}": ["p(95)<300"],
"http_req_duration{name:get dialog}": ["p(95)<300"],
"http_req_duration{name:serviceowner search}": ["p(95)<500"],
"http_req_duration{name:get dialog}": ["p(95)<500"],
"http_req_duration{name:get dialog activities}": ["p(95)<300"],
"http_req_duration{name:get dialog activity}": ["p(95)<300"],
"http_req_duration{name:get seenlogs}": ["p(95)<300"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { serviceownerSearch, emptySearchThresholds } from '../../performancetest_common/simpleSearch.js'
import { serviceOwners } from '../../performancetest_common/readTestdata.js';
import { validateTestData } from '../../performancetest_common/readTestdata.js';
export { setup as setup } from '../../performancetest_common/readTestdata.js';

import { serviceOwners, endUsers } from '../../performancetest_common/readTestdata.js';
import { randomItem } from '../../../common/k6-utils.js';
const tag_name = 'serviceowner search';
const traceCalls = (__ENV.traceCalls ?? 'false') === 'true';

Expand All @@ -17,7 +15,6 @@ export let options = {


export default function(data) {
const { endUsers, index } = validateTestData(data, serviceOwners);
serviceownerSearch(serviceOwners[0], endUsers[index], tag_name, traceCalls);
serviceownerSearch(serviceOwners[0], randomItem(endUsers), tag_name, traceCalls);
}

0 comments on commit 8b8f609

Please sign in to comment.