From 8bc3fc66248d5126f3e47a64de3cb1a31c6ecd10 Mon Sep 17 00:00:00 2001 From: Dagfinn Olsen Date: Tue, 8 Oct 2024 18:13:59 +0200 Subject: [PATCH] Performance test/send output to grafana cloud (#98) * send output to grafana cloud * removed install of azcopy, only needed when running act locally * changed tag from group to name --- .github/workflows/taxreport-loadtest-ondemand.yml | 2 ++ performance-tests/tax-report/src/tax-report.js | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/taxreport-loadtest-ondemand.yml b/.github/workflows/taxreport-loadtest-ondemand.yml index 735ff04..2630c56 100644 --- a/.github/workflows/taxreport-loadtest-ondemand.yml +++ b/.github/workflows/taxreport-loadtest-ondemand.yml @@ -66,6 +66,8 @@ jobs: env: K6_WEB_DASHBOARD: true K6_WEB_DASHBOARD_EXPORT: html-report.html + K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }} + K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }} serviceowner: ${{ secrets.OWNER }} - name: Upload summary html report diff --git a/performance-tests/tax-report/src/tax-report.js b/performance-tests/tax-report/src/tax-report.js index 51abe6b..70bcb03 100644 --- a/performance-tests/tax-report/src/tax-report.js +++ b/performance-tests/tax-report/src/tax-report.js @@ -105,7 +105,7 @@ export function create_instance(data, id) { Authorization: 'Bearer ' + id.token, 'Content-Type': 'application/json' }, - tags: { group: 'create_instance' } + tags: { name: 'create_instance' } }; var request_body = JSON.stringify(instance) @@ -120,7 +120,7 @@ export function upload_data(data, instance, id) { 'Content-Type': 'text/xml', 'Content-Disposition': 'attachment; filename=\"skattemelding.xml\"' }, - tags: { group: 'upload_data' } + tags: { name: 'upload_data' } }; return http.post(endPoint, taxXml, params); } @@ -131,7 +131,7 @@ export function trigger_callback_and_confirm(data, instance, id) { headers: { Authorization: 'Bearer ' + id.token }, - tags: { group: 'trigger_callback_and_confirm' } + tags: { name: 'trigger_callback_and_confirm' } } return http.put(endPoint, null, params); } @@ -151,7 +151,7 @@ export function http_get_with_token(endPoint, token, tag) { headers: { Authorization: 'Bearer ' + token }, - tags: { group: tag } + tags: { name: tag } } return http.get(endPoint, params); }