From 70dfaddcd95843c9ac0e314298f7bd3792dd4999 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 14:31:21 +0300 Subject: [PATCH 01/46] Add workflow load-tests --- .github/workflows/load-tests.yml | 162 +++++++++++++++++++++++++++++++ k6/.gitignore | 2 + k6/compare-results.js | 113 +++++++++++++++++++++ k6/output/.gitkeep | 0 k6/script.js | 44 +++++++++ 5 files changed, 321 insertions(+) create mode 100644 .github/workflows/load-tests.yml create mode 100644 k6/.gitignore create mode 100644 k6/compare-results.js create mode 100644 k6/output/.gitkeep create mode 100644 k6/script.js diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml new file mode 100644 index 000000000..f792750ee --- /dev/null +++ b/.github/workflows/load-tests.yml @@ -0,0 +1,162 @@ +name: Load Tests + +on: [pull_request] + +jobs: + test-base: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.base.sha }} + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Start Node.js API + run: node ./dist/src/main.js & + env: + SELF_URL: 'http://localhost:3001' + PUBLIC_API_PORT: 3001 + PUBLIC_API_PREFIX: '' + PRIVATE_API_PORT: 4001 + + - name: Install k6 + run: | + sudo gpg -k + sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 + echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list + sudo apt-get update + sudo apt-get install k6 + + - name: Wait for API to be ready + run: | + until curl --output /dev/null --silent --fail http://localhost:4000/hello; do + echo 'Waiting for API...' + sleep 1 + done + + - name: Run k6 Load Test + run: k6 run ./k6/script.js + + - name: Upload result file for base branch + uses: actions/upload-artifact@v2 + with: + name: base-results + path: k6/output/summary.json + + test-head: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Start Node.js API + run: node ./dist/src/main.js & + env: + SELF_URL: 'http://localhost:3001' + PUBLIC_API_PORT: 3001 + PUBLIC_API_PREFIX: '' + PRIVATE_API_PORT: 4001 + + - name: Install k6 + run: | + sudo gpg -k + sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69 + echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list + sudo apt-get update + sudo apt-get install k6 + + - name: Wait for API to be ready + run: | + until curl --output /dev/null --silent --fail http://localhost:4000/hello; do + echo 'Waiting for API...' + sleep 1 + done + + - name: Run k6 Load Test + run: k6 run ./k6/script.js + + - name: Upload result file for head branch + uses: actions/upload-artifact@v2 + with: + name: head-results + path: k6/output/summary.json + + compare-results: + runs-on: ubuntu-latest + + needs: [test-base, test-head] + steps: + - uses: actions/checkout@v2 + + - name: Download all artifacts + uses: actions/download-artifact@v2 + with: + path: artifacts + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '20' + + - name: Compare test results + run: | + node ./k6/compare-results.js ${{ github.event.pull_request.base.sha }} artifacts/base-results/summary.json ${{ github.event.pull_request.head.sha }} artifacts/head-results/summary.json report.md + + - name: Render the report from the template + id: template + uses: chuhlomin/render-template@v1 + if: github.event_name == 'pull_request' + with: + template: report.md + vars: | + base: ${{ github.event.pull_request.base.sha }} + head: ${{ github.event.pull_request.head.sha }} + + - name: Upload the report markdown + uses: actions/upload-artifact@v3 + if: github.event_name == 'pull_request' + with: + name: report-markdown + path: report.md + + - name: Find the comment containing the report + id: fc + uses: peter-evans/find-comment@v2 + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: 'k6 load testing comparison' + + - name: Create or update the report comment + uses: peter-evans/create-or-update-comment@v2 + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository + with: + comment-id: ${{ steps.fc.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: ${{ steps.template.outputs.result }} + edit-mode: replace diff --git a/k6/.gitignore b/k6/.gitignore new file mode 100644 index 000000000..77d1aa0a2 --- /dev/null +++ b/k6/.gitignore @@ -0,0 +1,2 @@ +output/* +!output/.gitkeep \ No newline at end of file diff --git a/k6/compare-results.js b/k6/compare-results.js new file mode 100644 index 000000000..9c467bd43 --- /dev/null +++ b/k6/compare-results.js @@ -0,0 +1,113 @@ +const fs = require('fs'); + +function generateComparisonTable(baseCommitHash, baseMetricsPath, targetCommitHash, targetMetricsPath, outputPath) { + // Load JSON outputs from k6 + const baseMetrics = JSON.parse(fs.readFileSync(baseMetricsPath, 'utf8')); + const targetMetrics = JSON.parse(fs.readFileSync(targetMetricsPath, 'utf8')); + + const baseData = extractMetrics(baseMetrics); + const targetData = extractMetrics(targetMetrics); + + const table = generateTable(baseCommitHash, baseData, targetCommitHash, targetData); + + fs.writeFileSync(outputPath, table); +} + +function extractMetrics(metrics) { + const extractedMetrics = {}; + const metricKeys = Object.keys(metrics.metrics); + + for (const key of metricKeys) { + if (key.endsWith('_http_req_duration')) { + const values = metrics.metrics[key].values; + const avgResponseTime = values.avg; + const maxResponseTime = values.max; + const p90 = values['p(90)']; + const p95 = values['p(95)']; + + const name = key.split('_')[0].charAt(0).toUpperCase() + key.split('_')[0].slice(1); + + if (!extractedMetrics[name]) { + extractedMetrics[name] = { avgResponseTime, maxResponseTime, p90, p95 }; + } else { + extractedMetrics[name].avgResponseTime = avgResponseTime; + extractedMetrics[name].maxResponseTime = maxResponseTime; + extractedMetrics[name].p90 = p90; + extractedMetrics[name].p95 = p95; + } + } + } + + extractedMetrics['Test Run Duration'] = metrics.state.testRunDurationMs; + + return extractedMetrics; +} + +function generateTable(baseCommitHash, baseData, targetCommitHash, targetData) { + let table = `k6 load testing comparison.\nBase Commit Hash: ${baseCommitHash}\nTarget Commit Hash: ${targetCommitHash}\n\n`; + table += '| Metric | Base | Target | Diff |\n'; + table += '| ------ | ---- | ------ | ---- |\n'; + + for (const key of Object.keys(baseData)) { + if (key === 'Test Run Duration') { + continue; + } + const baseAvg = baseData[key].avgResponseTime; + const targetAvg = targetData[key].avgResponseTime; + const baseMax = baseData[key].maxResponseTime; + const targetMax = targetData[key].maxResponseTime; + const baseP90 = baseData[key].p90; + const targetP90 = targetData[key].p90; + const baseP95 = baseData[key].p95; + const targetP95 = targetData[key].p95; + + const avgDiff = getDifferencePercentage(baseAvg, targetAvg); + const maxDiff = getDifferencePercentage(baseMax, targetMax); + const p90Diff = getDifferencePercentage(baseP90, targetP90); + const p95Diff = getDifferencePercentage(baseP95, targetP95); + + const avgColor = getColor(baseAvg, targetAvg); + const maxColor = getColor(baseMax, targetMax); + const p90Color = getColor(baseP90, targetP90); + const p95Color = getColor(baseP95, targetP95); + + table += `| **${key}** | | |\n`; + table += `| - Average Response Time | ${baseAvg.toFixed(2)} ms | ${targetAvg.toFixed(2)} ms | ${avgDiff} ${avgColor} |\n`; + table += `| - Max Response Time | ${baseMax.toFixed(2)} ms | ${targetMax.toFixed(2)} ms | ${maxDiff} ${maxColor} |\n`; + table += `| - 90th Percentile | ${baseP90.toFixed(2)} ms | ${targetP90.toFixed(2)} ms | ${p90Diff} ${p90Color} |\n`; + table += `| - 95th Percentile | ${baseP95.toFixed(2)} ms | ${targetP95.toFixed(2)} ms | ${p95Diff} ${p95Color} |\n`; + } + + const baseDuration = baseData['Test Run Duration'].toFixed(2); + const targetDuration = targetData['Test Run Duration'].toFixed(2); + table += `| **Test Run Duration** | ${baseDuration} ms | ${targetDuration} ms | |\n`; + + return table; +} + +function getColor(baseValue, targetValue) { + if (baseValue >= targetValue) { + return '✅'; // Green emoji for improvement or equivalence + } else { + return '🔴'; // Red emoji for degradation + } +} + +function getDifferencePercentage(baseValue, targetValue) { + const difference = ((targetValue - baseValue) / baseValue) * 100; + const sign = difference >= 0 ? '+' : ''; + return `${sign}${difference.toFixed(2)}%`; +} + +if (process.argv.length !== 7) { + console.error('Usage: node compare-results.js baseCommitHash baseMetricsPath targetCommitHash targetMetricsPath outputFile'); + process.exit(1); +} + +const baseCommitHash = process.argv[2]; +const baseMetricsPath = process.argv[3]; +const targetCommitHash = process.argv[4]; +const targetMetricsPath = process.argv[5]; +const outputPath = process.argv[6]; + +generateComparisonTable(baseCommitHash, baseMetricsPath, targetCommitHash, targetMetricsPath, outputPath); diff --git a/k6/output/.gitkeep b/k6/output/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/k6/script.js b/k6/script.js new file mode 100644 index 000000000..c7d4adf0c --- /dev/null +++ b/k6/script.js @@ -0,0 +1,44 @@ +import http from 'k6/http'; +import { sleep } from 'k6'; +import { Trend } from 'k6/metrics'; + +const BASE_URL = 'http://localhost:3001'; + +const tokensApiCallTrened = new Trend('tokens_api_call_trend', true); +const nodesApiCallTrened = new Trend('nodes_api_call_trend', true); + +export const options = { + scenarios: { + tokens: { + executor: 'constant-vus', + vus: 10, + duration: '30s', + gracefulStop: '0s', + exec: 'tokens', + }, + nodes: { + executor: 'constant-vus', + vus: 10, + duration: '30s', + gracefulStop: '0s', + exec: 'nodes', + }, + }, + discardResponseBodies: true, +}; + +export function tokens() { + const response = http.get(`${BASE_URL}/tokens`); + tokensApiCallTrened.add(response.timings.duration); +} + +export function nodes() { + const response = http.get(`${BASE_URL}/nodes`); + nodesApiCallTrened.add(response.timings.duration); +} + +export function handleSummary(data) { + return { + 'k6/output/summary.json': JSON.stringify(data), + }; +} \ No newline at end of file From 11016d3ba07c0a105583fdc5efa894acb7bdc463 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 14:48:41 +0300 Subject: [PATCH 02/46] Add initialization of the project --- .github/workflows/load-tests.yml | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index f792750ee..b40c9fb48 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -19,16 +19,19 @@ jobs: - name: Install dependencies run: npm ci + - name: Initialize the project + run: npm run init + - name: Build run: npm run build - name: Start Node.js API run: node ./dist/src/main.js & - env: - SELF_URL: 'http://localhost:3001' - PUBLIC_API_PORT: 3001 - PUBLIC_API_PREFIX: '' - PRIVATE_API_PORT: 4001 + # env: + # SELF_URL: 'http://localhost:3001' + # PUBLIC_API_PORT: 3001 + # PUBLIC_API_PREFIX: '' + # PRIVATE_API_PORT: 4001 - name: Install k6 run: | @@ -70,16 +73,19 @@ jobs: - name: Install dependencies run: npm ci + - name: Initialize the project + run: npm run init + - name: Build run: npm run build - name: Start Node.js API run: node ./dist/src/main.js & - env: - SELF_URL: 'http://localhost:3001' - PUBLIC_API_PORT: 3001 - PUBLIC_API_PREFIX: '' - PRIVATE_API_PORT: 4001 + # env: + # SELF_URL: 'http://localhost:3001' + # PUBLIC_API_PORT: 3001 + # PUBLIC_API_PREFIX: '' + # PRIVATE_API_PORT: 4001 - name: Install k6 run: | @@ -107,7 +113,7 @@ jobs: compare-results: runs-on: ubuntu-latest - + needs: [test-base, test-head] steps: - uses: actions/checkout@v2 From b434f4107c08e6c0f71eec45cd00d068864b375b Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 14:52:39 +0300 Subject: [PATCH 03/46] Fix port when waiting for API --- .github/workflows/load-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index b40c9fb48..b5716ee94 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -43,7 +43,7 @@ jobs: - name: Wait for API to be ready run: | - until curl --output /dev/null --silent --fail http://localhost:4000/hello; do + until curl --output /dev/null --silent --fail http://localhost:4001/hello; do echo 'Waiting for API...' sleep 1 done @@ -97,7 +97,7 @@ jobs: - name: Wait for API to be ready run: | - until curl --output /dev/null --silent --fail http://localhost:4000/hello; do + until curl --output /dev/null --silent --fail http://localhost:4001/hello; do echo 'Waiting for API...' sleep 1 done From f8a972cf5b06e63c364b1d26ed1872afec411460 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 14:56:34 +0300 Subject: [PATCH 04/46] Add config for API --- .github/workflows/load-tests.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index b5716ee94..2c980abcb 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -27,11 +27,11 @@ jobs: - name: Start Node.js API run: node ./dist/src/main.js & - # env: - # SELF_URL: 'http://localhost:3001' - # PUBLIC_API_PORT: 3001 - # PUBLIC_API_PREFIX: '' - # PRIVATE_API_PORT: 4001 + env: + SELF_URL: 'http://localhost:3001' + PUBLIC_API_PORT: 3001 + PUBLIC_API_PREFIX: '' + PRIVATE_API_PORT: 4001 - name: Install k6 run: | @@ -81,11 +81,11 @@ jobs: - name: Start Node.js API run: node ./dist/src/main.js & - # env: - # SELF_URL: 'http://localhost:3001' - # PUBLIC_API_PORT: 3001 - # PUBLIC_API_PREFIX: '' - # PRIVATE_API_PORT: 4001 + env: + SELF_URL: 'http://localhost:3001' + PUBLIC_API_PORT: 3001 + PUBLIC_API_PREFIX: '' + PRIVATE_API_PORT: 4001 - name: Install k6 run: | From 82fbf5eecd4997652a4a8ac68b9dc4b5c8ceec09 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 15:23:13 +0300 Subject: [PATCH 05/46] Add folder content for debug --- .github/workflows/load-tests.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 2c980abcb..5ce7a82a9 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -26,12 +26,10 @@ jobs: run: npm run build - name: Start Node.js API - run: node ./dist/src/main.js & - env: - SELF_URL: 'http://localhost:3001' - PUBLIC_API_PORT: 3001 - PUBLIC_API_PREFIX: '' - PRIVATE_API_PORT: 4001 + run: node ./dist/src/main.js + + - name: Check folder content + run: ls -la - name: Install k6 run: | @@ -80,12 +78,10 @@ jobs: run: npm run build - name: Start Node.js API - run: node ./dist/src/main.js & - env: - SELF_URL: 'http://localhost:3001' - PUBLIC_API_PORT: 3001 - PUBLIC_API_PREFIX: '' - PRIVATE_API_PORT: 4001 + run: node ./dist/src/main.js + + - name: Check folder content + run: ls -la - name: Install k6 run: | From b769cbf65e4b0ea6ba560cfeef8244b7fa7a8195 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 15:24:59 +0300 Subject: [PATCH 06/46] Add folder content for debug before api start --- .github/workflows/load-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 5ce7a82a9..b4c11b1ba 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -25,12 +25,12 @@ jobs: - name: Build run: npm run build - - name: Start Node.js API - run: node ./dist/src/main.js - - name: Check folder content run: ls -la + - name: Start Node.js API + run: node ./dist/src/main.js + - name: Install k6 run: | sudo gpg -k @@ -77,12 +77,12 @@ jobs: - name: Build run: npm run build - - name: Start Node.js API - run: node ./dist/src/main.js - - name: Check folder content run: ls -la + - name: Start Node.js API + run: node ./dist/src/main.js + - name: Install k6 run: | sudo gpg -k From 9edab352e59f4ef48134bca9e655a3f1bbb36e31 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 15:27:41 +0300 Subject: [PATCH 07/46] Add debug for config file --- .github/workflows/load-tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index b4c11b1ba..ca372e47b 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -28,6 +28,9 @@ jobs: - name: Check folder content run: ls -la + - run: ls ./dist + - run: ls ./dist/config + - name: Start Node.js API run: node ./dist/src/main.js @@ -79,6 +82,8 @@ jobs: - name: Check folder content run: ls -la + - run: ls ./dist + - run: ls ./dist/config - name: Start Node.js API run: node ./dist/src/main.js From fb582d58572448d59999339afde2598411f36a1f Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 15:30:28 +0300 Subject: [PATCH 08/46] Remove config.yaml from gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index d42d00011..01fcd17b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ # compiled output /dist /node_modules -/config/config.yaml /config/config.custom.yaml /config/config.custom.devnet.yaml /config/config.custom.testnet.yaml From 7ddb1349a583d5c1fc2af6987eac723772b4f004 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 16:13:39 +0300 Subject: [PATCH 09/46] Add config.yaml file in dist --- .github/workflows/load-tests.yml | 12 ++++++------ .gitignore | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index ca372e47b..8a20a5d59 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -22,15 +22,12 @@ jobs: - name: Initialize the project run: npm run init + - name: Copy devnet config file from src to dist + run: cp ./config/config.devnet.yaml ./dist/config/config.yaml + - name: Build run: npm run build - - name: Check folder content - run: ls -la - - - run: ls ./dist - - run: ls ./dist/config - - name: Start Node.js API run: node ./dist/src/main.js @@ -77,6 +74,9 @@ jobs: - name: Initialize the project run: npm run init + - name: Copy devnet config file from src to dist + run: cp ./config/config.devnet.yaml ./dist/config/config.yaml + - name: Build run: npm run build diff --git a/.gitignore b/.gitignore index 01fcd17b6..d42d00011 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # compiled output /dist /node_modules +/config/config.yaml /config/config.custom.yaml /config/config.custom.devnet.yaml /config/config.custom.testnet.yaml From c8ac3ae421a9f433faa77000dc537cf91859f2d5 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 16:15:18 +0300 Subject: [PATCH 10/46] Move config copy after build --- .github/workflows/load-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 8a20a5d59..a7fb6b1e8 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -22,12 +22,12 @@ jobs: - name: Initialize the project run: npm run init - - name: Copy devnet config file from src to dist - run: cp ./config/config.devnet.yaml ./dist/config/config.yaml - - name: Build run: npm run build + - name: Copy devnet config file from src to dist + run: cp ./config/config.devnet.yaml ./dist/config/config.yaml + - name: Start Node.js API run: node ./dist/src/main.js @@ -74,12 +74,12 @@ jobs: - name: Initialize the project run: npm run init - - name: Copy devnet config file from src to dist - run: cp ./config/config.devnet.yaml ./dist/config/config.yaml - - name: Build run: npm run build + - name: Copy devnet config file from src to dist + run: cp ./config/config.devnet.yaml ./dist/config/config.yaml + - name: Check folder content run: ls -la - run: ls ./dist From 26666f61c18455aa623169f0ebaa197a184dff55 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 16:19:18 +0300 Subject: [PATCH 11/46] Add docker services --- .github/workflows/load-tests.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index a7fb6b1e8..9bfc6e8a7 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -28,6 +28,9 @@ jobs: - name: Copy devnet config file from src to dist run: cp ./config/config.devnet.yaml ./dist/config/config.yaml + - name: Start docker services + run: docker-compose up -d + - name: Start Node.js API run: node ./dist/src/main.js @@ -55,6 +58,9 @@ jobs: name: base-results path: k6/output/summary.json + - name: Stop docker services + run: docker-compose down + test-head: runs-on: ubuntu-latest @@ -80,10 +86,8 @@ jobs: - name: Copy devnet config file from src to dist run: cp ./config/config.devnet.yaml ./dist/config/config.yaml - - name: Check folder content - run: ls -la - - run: ls ./dist - - run: ls ./dist/config + - name: Start docker services + run: docker-compose up -d - name: Start Node.js API run: node ./dist/src/main.js @@ -112,6 +116,9 @@ jobs: name: head-results path: k6/output/summary.json + - name: Stop docker services + run: docker-compose down + compare-results: runs-on: ubuntu-latest From 1fca5cd0ec6199660ba07f685fccc63984bd6236 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 16:21:14 +0300 Subject: [PATCH 12/46] Remove wrong added - --- .github/workflows/load-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 9bfc6e8a7..2cc76b62d 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -29,7 +29,7 @@ jobs: run: cp ./config/config.devnet.yaml ./dist/config/config.yaml - name: Start docker services - run: docker-compose up -d + run: docker compose up -d - name: Start Node.js API run: node ./dist/src/main.js @@ -59,7 +59,7 @@ jobs: path: k6/output/summary.json - name: Stop docker services - run: docker-compose down + run: docker compose down test-head: runs-on: ubuntu-latest @@ -87,7 +87,7 @@ jobs: run: cp ./config/config.devnet.yaml ./dist/config/config.yaml - name: Start docker services - run: docker-compose up -d + run: docker compose up -d - name: Start Node.js API run: node ./dist/src/main.js @@ -117,7 +117,7 @@ jobs: path: k6/output/summary.json - name: Stop docker services - run: docker-compose down + run: docker compose down compare-results: runs-on: ubuntu-latest From 87caacd4a03847c9958de919e742c5543a55453e Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 16:23:10 +0300 Subject: [PATCH 13/46] Change rabbitmq version --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b2affba69..0f1c34da8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: image: jrottenberg/ffmpeg rabbitmq: - image: rabbitmq:3.5 + image: rabbitmq:3.9 container_name: rabbitmq environment: RABBITMQ_DEFAULT_USER: guest From 559b3c1bbc6925bb1d8bcb38c1ba337fd676d0a4 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Fri, 16 Aug 2024 16:27:13 +0300 Subject: [PATCH 14/46] Add background API start --- .github/workflows/load-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 2cc76b62d..2abeab448 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -32,7 +32,7 @@ jobs: run: docker compose up -d - name: Start Node.js API - run: node ./dist/src/main.js + run: node ./dist/src/main.js & - name: Install k6 run: | @@ -90,7 +90,7 @@ jobs: run: docker compose up -d - name: Start Node.js API - run: node ./dist/src/main.js + run: node ./dist/src/main.js & - name: Install k6 run: | From b83aa80436ac551f2b68c3cb2a890181e20e8c26 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Mon, 19 Aug 2024 10:54:54 +0300 Subject: [PATCH 15/46] Add docker installation in workflow --- .github/workflows/load-tests.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 2abeab448..683de5c90 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -16,6 +16,29 @@ jobs: with: node-version: '20' + - name: Check Docker Version + run: docker --version + + - name: Install Latest Docker + run: | + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + sudo apt-get update + sudo apt-get install docker-ce + + - name: Check Docker Version + run: docker --version + + - name: Install Docker Compose 2.23.0 + run: | + DOCKER_COMPOSE_VERSION=2.23.0 + sudo curl -L "https://github.com/docker/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose + + - name: Check Docker Compose Version + run: docker-compose --version + - name: Install dependencies run: npm ci From 1366341f640a4960ffe721206ab760be3e5942bf Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Mon, 19 Aug 2024 10:59:14 +0300 Subject: [PATCH 16/46] Changed docker compose version use to start services --- .github/workflows/load-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 683de5c90..a83444e1e 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -52,7 +52,7 @@ jobs: run: cp ./config/config.devnet.yaml ./dist/config/config.yaml - name: Start docker services - run: docker compose up -d + run: docker-compose up -d - name: Start Node.js API run: node ./dist/src/main.js & From e9ed9b163a4fc684cbfb669afac319b365ff0dfb Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Mon, 19 Aug 2024 11:02:29 +0300 Subject: [PATCH 17/46] Changed docker compose version --- .github/workflows/load-tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index a83444e1e..5be2bf13c 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -29,12 +29,11 @@ jobs: - name: Check Docker Version run: docker --version - - name: Install Docker Compose 2.23.0 + - name: Install Docker Compose v2.23.0-desktop.1 run: | - DOCKER_COMPOSE_VERSION=2.23.0 - sudo curl -L "https://github.com/docker/compose/releases/download/v${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + DOCKER_COMPOSE_VERSION=v2.23.0-desktop.1 + sudo curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose - sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose - name: Check Docker Compose Version run: docker-compose --version From 3f688d82e80c285df135efa4853c3d08dbef2455 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Mon, 19 Aug 2024 11:04:21 +0300 Subject: [PATCH 18/46] Add docker compose global --- .github/workflows/load-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 5be2bf13c..1a778d7f3 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -34,6 +34,7 @@ jobs: DOCKER_COMPOSE_VERSION=v2.23.0-desktop.1 sudo curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose + sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose - name: Check Docker Compose Version run: docker-compose --version From 49cdb9c23f5cae5d779e8897a01e21c387e6f9e2 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Mon, 19 Aug 2024 11:08:25 +0300 Subject: [PATCH 19/46] Change docker compose plugin version --- .github/workflows/load-tests.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 1a778d7f3..f81b071ee 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -29,15 +29,16 @@ jobs: - name: Check Docker Version run: docker --version - - name: Install Docker Compose v2.23.0-desktop.1 + - name: Install Docker Compose Plugin v2.23.0-desktop.1 run: | DOCKER_COMPOSE_VERSION=v2.23.0-desktop.1 - sudo curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose + mkdir -p ~/.docker/cli-plugins/ + curl -SL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 \ + -o ~/.docker/cli-plugins/docker-compose + chmod +x ~/.docker/cli-plugins/docker-compose - name: Check Docker Compose Version - run: docker-compose --version + run: docker compose version - name: Install dependencies run: npm ci @@ -52,7 +53,7 @@ jobs: run: cp ./config/config.devnet.yaml ./dist/config/config.yaml - name: Start docker services - run: docker-compose up -d + run: docker compose up -d - name: Start Node.js API run: node ./dist/src/main.js & From 9d8b3635b6dd625932398f7f549497432a71ecd3 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Mon, 19 Aug 2024 11:21:11 +0300 Subject: [PATCH 20/46] Change docker compose plugin version --- .github/workflows/load-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index f81b071ee..638849704 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -24,14 +24,14 @@ jobs: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update - sudo apt-get install docker-ce + sudo apt-get install docker-ce docker-ce-cli containerd.io - name: Check Docker Version run: docker --version - - name: Install Docker Compose Plugin v2.23.0-desktop.1 + - name: Install Docker Compose Plugin v2.23.0 run: | - DOCKER_COMPOSE_VERSION=v2.23.0-desktop.1 + DOCKER_COMPOSE_VERSION=2.23.0 mkdir -p ~/.docker/cli-plugins/ curl -SL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 \ -o ~/.docker/cli-plugins/docker-compose From a401b46876edda5dbfe9801baa4b2ee5afef4018 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Mon, 19 Aug 2024 13:56:04 +0300 Subject: [PATCH 21/46] Update trend names --- .github/workflows/load-tests.yml | 24 ------------------------ k6/script.js | 4 ++-- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 638849704..2abeab448 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -16,30 +16,6 @@ jobs: with: node-version: '20' - - name: Check Docker Version - run: docker --version - - - name: Install Latest Docker - run: | - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get install docker-ce docker-ce-cli containerd.io - - - name: Check Docker Version - run: docker --version - - - name: Install Docker Compose Plugin v2.23.0 - run: | - DOCKER_COMPOSE_VERSION=2.23.0 - mkdir -p ~/.docker/cli-plugins/ - curl -SL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 \ - -o ~/.docker/cli-plugins/docker-compose - chmod +x ~/.docker/cli-plugins/docker-compose - - - name: Check Docker Compose Version - run: docker compose version - - name: Install dependencies run: npm ci diff --git a/k6/script.js b/k6/script.js index c7d4adf0c..1d001dc40 100644 --- a/k6/script.js +++ b/k6/script.js @@ -4,8 +4,8 @@ import { Trend } from 'k6/metrics'; const BASE_URL = 'http://localhost:3001'; -const tokensApiCallTrened = new Trend('tokens_api_call_trend', true); -const nodesApiCallTrened = new Trend('nodes_api_call_trend', true); +const tokensApiCallTrened = new Trend('tokens_http_req_duration', true); +const nodesApiCallTrened = new Trend('nodes_http_req_duration', true); export const options = { scenarios: { From ef05bc74b101a0d7a7392c93cb4c09f8838539d6 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Mon, 19 Aug 2024 15:07:41 +0300 Subject: [PATCH 22/46] Add cache preload --- .github/workflows/load-tests.yml | 6 ++++++ k6/preload.js | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 k6/preload.js diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 2abeab448..e30a245c5 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -49,6 +49,9 @@ jobs: sleep 1 done + - name: Preload cache + run: k6 run ./k6/preload.js + - name: Run k6 Load Test run: k6 run ./k6/script.js @@ -107,6 +110,9 @@ jobs: sleep 1 done + - name: Preload cache + run: k6 run ./k6/preload.js + - name: Run k6 Load Test run: k6 run ./k6/script.js diff --git a/k6/preload.js b/k6/preload.js new file mode 100644 index 000000000..01eb5ab34 --- /dev/null +++ b/k6/preload.js @@ -0,0 +1,8 @@ +import http from 'k6/http'; + +const BASE_URL = 'http://localhost:3001'; + +export default function () { + http.get(`${BASE_URL}/tokens`); + http.get(`${BASE_URL}/nodes`); +} \ No newline at end of file From 3c9a66b3d300ac59aaeb31996e39128bc9031a35 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Mon, 19 Aug 2024 15:09:32 +0300 Subject: [PATCH 23/46] Add 1 minute duration --- k6/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/k6/script.js b/k6/script.js index 1d001dc40..762511974 100644 --- a/k6/script.js +++ b/k6/script.js @@ -12,14 +12,14 @@ export const options = { tokens: { executor: 'constant-vus', vus: 10, - duration: '30s', + duration: '1m', gracefulStop: '0s', exec: 'tokens', }, nodes: { executor: 'constant-vus', vus: 10, - duration: '30s', + duration: '1m', gracefulStop: '0s', exec: 'nodes', }, From 1284d94913cf00356dd5b04d235349e48bd38fd8 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Tue, 20 Aug 2024 10:18:49 +0300 Subject: [PATCH 24/46] Add preload for all tokens/nodes --- k6/preload.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/k6/preload.js b/k6/preload.js index 01eb5ab34..4bd1968ae 100644 --- a/k6/preload.js +++ b/k6/preload.js @@ -2,7 +2,9 @@ import http from 'k6/http'; const BASE_URL = 'http://localhost:3001'; -export default function () { - http.get(`${BASE_URL}/tokens`); - http.get(`${BASE_URL}/nodes`); +export default function preloadCache() { + const numberofTokens = http.get(`${BASE_URL}/tokens/count`); + http.get(`${BASE_URL}/tokens?size=${numberofTokens}`); + const numberofNodes = http.get(`${BASE_URL}/nodes/count`); + http.get(`${BASE_URL}/nodes?size=${numberofNodes}`); } \ No newline at end of file From 33ba74704727eb1a7e93ec3830f1c4d2c64d1396 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Tue, 20 Aug 2024 10:22:07 +0300 Subject: [PATCH 25/46] Add preload for all tokens/nodes --- k6/preload.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/k6/preload.js b/k6/preload.js index 01eb5ab34..5d7aea97d 100644 --- a/k6/preload.js +++ b/k6/preload.js @@ -3,6 +3,8 @@ import http from 'k6/http'; const BASE_URL = 'http://localhost:3001'; export default function () { - http.get(`${BASE_URL}/tokens`); - http.get(`${BASE_URL}/nodes`); + const numberofTokens = http.get(`${BASE_URL}/tokens/count`); + http.get(`${BASE_URL}/tokens?size=${numberofTokens}`); + const numberofNodes = http.get(`${BASE_URL}/nodes/count`); + http.get(`${BASE_URL}/nodes?size=${numberofNodes}`); } \ No newline at end of file From 0b762664e62b488aa424002ff0d317481cb4ff96 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Tue, 20 Aug 2024 11:48:41 +0300 Subject: [PATCH 26/46] test --- k6/preload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k6/preload.js b/k6/preload.js index 4bd1968ae..5aed9907a 100644 --- a/k6/preload.js +++ b/k6/preload.js @@ -7,4 +7,4 @@ export default function preloadCache() { http.get(`${BASE_URL}/tokens?size=${numberofTokens}`); const numberofNodes = http.get(`${BASE_URL}/nodes/count`); http.get(`${BASE_URL}/nodes?size=${numberofNodes}`); -} \ No newline at end of file +} From b0355a86cc6ada0216f0a7c47342ea297edd3e33 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Tue, 20 Aug 2024 14:27:40 +0300 Subject: [PATCH 27/46] Change table --- k6/compare-results.js | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/k6/compare-results.js b/k6/compare-results.js index 9c467bd43..8f8a480a9 100644 --- a/k6/compare-results.js +++ b/k6/compare-results.js @@ -45,8 +45,27 @@ function extractMetrics(metrics) { function generateTable(baseCommitHash, baseData, targetCommitHash, targetData) { let table = `k6 load testing comparison.\nBase Commit Hash: ${baseCommitHash}\nTarget Commit Hash: ${targetCommitHash}\n\n`; - table += '| Metric | Base | Target | Diff |\n'; - table += '| ------ | ---- | ------ | ---- |\n'; + table += ' \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ +
MetricBaseTargetDiff
Avg timeMax time90 Perc95 PercAvg timeMax time90 Perc95 PercAvg timeMax time90 Perc95 Perc
'; + // table += '| Metric | Base | Target | Diff |\n'; + // table += '| ------ | ---- | ------ | ---- |\n'; for (const key of Object.keys(baseData)) { if (key === 'Test Run Duration') { @@ -71,16 +90,22 @@ function generateTable(baseCommitHash, baseData, targetCommitHash, targetData) { const p90Color = getColor(baseP90, targetP90); const p95Color = getColor(baseP95, targetP95); - table += `| **${key}** | | |\n`; - table += `| - Average Response Time | ${baseAvg.toFixed(2)} ms | ${targetAvg.toFixed(2)} ms | ${avgDiff} ${avgColor} |\n`; - table += `| - Max Response Time | ${baseMax.toFixed(2)} ms | ${targetMax.toFixed(2)} ms | ${maxDiff} ${maxColor} |\n`; - table += `| - 90th Percentile | ${baseP90.toFixed(2)} ms | ${targetP90.toFixed(2)} ms | ${p90Diff} ${p90Color} |\n`; - table += `| - 95th Percentile | ${baseP95.toFixed(2)} ms | ${targetP95.toFixed(2)} ms | ${p95Diff} ${p95Color} |\n`; + table += `${key}`; + table += `${baseAvg.toFixed(2)} ms${baseMax.toFixed(2)} ms${baseP90.toFixed(2)} ms${baseP95.toFixed(2)} ms`; + table += `${targetAvg.toFixed(2)} ms${targetMax.toFixed(2)} ms${targetP90.toFixed(2)} ms${targetP95.toFixed(2)} ms`; + table += `${avgDiff} ${avgColor}${maxDiff} ${maxColor}${p90Diff} ${p90Color}${p95Diff} ${p95Color}`; + + // table += `| **${key}** | | |\n`; + // table += `| - Average Response Time | ${baseAvg.toFixed(2)} ms | ${targetAvg.toFixed(2)} ms | ${avgDiff} ${avgColor} |\n`; + // table += `| - Max Response Time | ${baseMax.toFixed(2)} ms | ${targetMax.toFixed(2)} ms | ${maxDiff} ${maxColor} |\n`; + // table += `| - 90th Percentile | ${baseP90.toFixed(2)} ms | ${targetP90.toFixed(2)} ms | ${p90Diff} ${p90Color} |\n`; + // table += `| - 95th Percentile | ${baseP95.toFixed(2)} ms | ${targetP95.toFixed(2)} ms | ${p95Diff} ${p95Color} |\n`; } const baseDuration = baseData['Test Run Duration'].toFixed(2); const targetDuration = targetData['Test Run Duration'].toFixed(2); - table += `| **Test Run Duration** | ${baseDuration} ms | ${targetDuration} ms | |\n`; + table += `Test Run Duration${baseDuration} ms${targetDuration} ms`; + // table += `| **Test Run Duration** | ${baseDuration} ms | ${targetDuration} ms | |\n`; return table; } From 1edf2def99e85294e08d03c2af04d685c3e1b4e7 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Tue, 20 Aug 2024 14:33:00 +0300 Subject: [PATCH 28/46] Change wrong closing tag for table --- k6/compare-results.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/k6/compare-results.js b/k6/compare-results.js index 8f8a480a9..71484076a 100644 --- a/k6/compare-results.js +++ b/k6/compare-results.js @@ -63,7 +63,7 @@ function generateTable(baseCommitHash, baseData, targetCommitHash, targetData) { Max time \ 90 Perc \ 95 Perc \ - '; + '; // table += '| Metric | Base | Target | Diff |\n'; // table += '| ------ | ---- | ------ | ---- |\n'; @@ -104,7 +104,7 @@ function generateTable(baseCommitHash, baseData, targetCommitHash, targetData) { const baseDuration = baseData['Test Run Duration'].toFixed(2); const targetDuration = targetData['Test Run Duration'].toFixed(2); - table += `Test Run Duration${baseDuration} ms${targetDuration} ms`; + table += `Test Run Duration${baseDuration} ms${targetDuration} ms`; // table += `| **Test Run Duration** | ${baseDuration} ms | ${targetDuration} ms | |\n`; return table; From d2dfd66f889c5600c54be685c7c5514d8e18ee6b Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Tue, 20 Aug 2024 16:40:17 +0300 Subject: [PATCH 29/46] Refactor generateTable function --- k6/compare-results.js | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/k6/compare-results.js b/k6/compare-results.js index 71484076a..c7be7661c 100644 --- a/k6/compare-results.js +++ b/k6/compare-results.js @@ -44,28 +44,20 @@ function extractMetrics(metrics) { } function generateTable(baseCommitHash, baseData, targetCommitHash, targetData) { + const headers = ['Avg', 'Max', '90', '95']; let table = `k6 load testing comparison.\nBase Commit Hash: ${baseCommitHash}\nTarget Commit Hash: ${targetCommitHash}\n\n`; table += ' \ \ \ \ \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - '; - // table += '| Metric | Base | Target | Diff |\n'; - // table += '| ------ | ---- | ------ | ---- |\n'; + ' + for (let i = 0; i < 3; i++) { + headers.forEach(header => { + table += ``; + }); + } + table += ''; for (const key of Object.keys(baseData)) { if (key === 'Test Run Duration') { @@ -91,21 +83,15 @@ function generateTable(baseCommitHash, baseData, targetCommitHash, targetData) { const p95Color = getColor(baseP95, targetP95); table += ``; - table += ``; - table += ``; + table += ``; + table += ``; table += ``; - - // table += `| **${key}** | | |\n`; - // table += `| - Average Response Time | ${baseAvg.toFixed(2)} ms | ${targetAvg.toFixed(2)} ms | ${avgDiff} ${avgColor} |\n`; - // table += `| - Max Response Time | ${baseMax.toFixed(2)} ms | ${targetMax.toFixed(2)} ms | ${maxDiff} ${maxColor} |\n`; - // table += `| - 90th Percentile | ${baseP90.toFixed(2)} ms | ${targetP90.toFixed(2)} ms | ${p90Diff} ${p90Color} |\n`; - // table += `| - 95th Percentile | ${baseP95.toFixed(2)} ms | ${targetP95.toFixed(2)} ms | ${p95Diff} ${p95Color} |\n`; } const baseDuration = baseData['Test Run Duration'].toFixed(2); const targetDuration = targetData['Test Run Duration'].toFixed(2); - table += `
MetricBaseTargetDiff
Avg timeMax time90 Perc95 PercAvg timeMax time90 Perc95 PercAvg timeMax time90 Perc95 Perc
${header}
${key}${baseAvg.toFixed(2)} ms${baseMax.toFixed(2)} ms${baseP90.toFixed(2)} ms${baseP95.toFixed(2)} ms${targetAvg.toFixed(2)} ms${targetMax.toFixed(2)} ms${targetP90.toFixed(2)} ms${targetP95.toFixed(2)} ms${baseAvg.toFixed(2)}${baseMax.toFixed(2)}${baseP90.toFixed(2)}${baseP95.toFixed(2)}${targetAvg.toFixed(2)}${targetMax.toFixed(2)}${targetP90.toFixed(2)}${targetP95.toFixed(2)}${avgDiff} ${avgColor}${maxDiff} ${maxColor}${p90Diff} ${p90Color}${p95Diff} ${p95Color}
Test Run Duration${baseDuration} ms${targetDuration} ms
`; - // table += `| **Test Run Duration** | ${baseDuration} ms | ${targetDuration} ms | |\n`; + table += `Test Run Duration${baseDuration}${targetDuration}`; + table += '\n\nLegend: Avg - Average Response Time, Max - Maximum Response Time, 90 - 90th Percentile, 95 - 95th Percentile\nAll times are in milliseconds.\n'; return table; } From 497ed24d08823cdb258c4b29ed49f99ca83f1f54 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Wed, 21 Aug 2024 10:54:48 +0300 Subject: [PATCH 30/46] Add more endpoints --- k6/script.js | 93 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 74 insertions(+), 19 deletions(-) diff --git a/k6/script.js b/k6/script.js index 762511974..75352e6d7 100644 --- a/k6/script.js +++ b/k6/script.js @@ -4,32 +4,67 @@ import { Trend } from 'k6/metrics'; const BASE_URL = 'http://localhost:3001'; -const tokensApiCallTrened = new Trend('tokens_http_req_duration', true); -const nodesApiCallTrened = new Trend('nodes_http_req_duration', true); +const accountsApiCallTrend = new Trend('accounts_http_req_duration', true); +const blocksApiCallTrend = new Trend('blocks_http_req_duration', true); +const mexPairsApiCallTrend = new Trend('mex_pairs_http_req_duration', true); +const mexTokensApiCallTrend = new Trend('mex_tokens_http_req_duration', true); +const mexFarmsApiCallTrend = new Trend('mex_farms_http_req_duration', true); +const nodesApiCallTrend = new Trend('nodes_http_req_duration', true); +const nodesAuctionsApiCallTrend = new Trend('nodes_auctions_http_req_duration', true); +const poolApiCallTrend = new Trend('pool_http_req_duration', true); +const tokensApiCallTrend = new Trend('tokens_http_req_duration', true); +const transactionsApiCallTrend = new Trend('transactions_http_req_duration', true); + + +function getScenarioDict(functionName) { + return { + executor: 'constant-vus', + vus: 10, + duration: '1m', + gracefulStop: '0s', + exec: functionName, + } +} export const options = { scenarios: { - tokens: { - executor: 'constant-vus', - vus: 10, - duration: '1m', - gracefulStop: '0s', - exec: 'tokens', - }, - nodes: { - executor: 'constant-vus', - vus: 10, - duration: '1m', - gracefulStop: '0s', - exec: 'nodes', - }, + accounts: getScenarioDict('accounts'), + blocks: getScenarioDict('blocks'), + mexPairs: getScenarioDict('mexPairs'), + mexTokens: getScenarioDict('mexTokens'), + mexFarms: getScenarioDict('mexFarms'), + nodes: getScenarioDict('nodes'), + nodesAuctions: getScenarioDict('nodesAuctions'), + pool: getScenarioDict('pool'), + tokens: getScenarioDict('tokens'), + transactions: getScenarioDict('transactions'), }, discardResponseBodies: true, }; -export function tokens() { - const response = http.get(`${BASE_URL}/tokens`); - tokensApiCallTrened.add(response.timings.duration); +export function accounts() { + const response = http.get(`${BASE_URL}/accounts`); + accountsApiCallTrened.add(response.timings.duration); +} + +export function blocks() { + const response = http.get(`${BASE_URL}/blocks`); + blocksApiCallTrened.add(response.timings.duration); +} + +export function mexPairs() { + const response = http.get(`${BASE_URL}/mex/pairs`); + nodesApiCallTrened.add(response.timings.duration); +} + +export function mexTokens() { + const response = http.get(`${BASE_URL}/mex/tokens`); + nodesApiCallTrened.add(response.timings.duration); +} + +export function mexFarms() { + const response = http.get(`${BASE_URL}/mex/farms`); + nodesApiCallTrened.add(response.timings.duration); } export function nodes() { @@ -37,6 +72,26 @@ export function nodes() { nodesApiCallTrened.add(response.timings.duration); } +export function nodesAuctions() { + const response = http.get(`${BASE_URL}/nodes/auctions`); + nodesApiCallTrened.add(response.timings.duration); +} + +export function pool() { + const response = http.get(`${BASE_URL}/pool`); + nodesApiCallTrened.add(response.timings.duration); +} + +export function tokens() { + const response = http.get(`${BASE_URL}/tokens`); + tokensApiCallTrened.add(response.timings.duration); +} + +export function transactions() { + const response = http.get(`${BASE_URL}/transactions`); + transactionsApiCallTrened.add(response.timings.duration); +} + export function handleSummary(data) { return { 'k6/output/summary.json': JSON.stringify(data), From c6dd9147a1493097371210dafdc4e83300b7bfd1 Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Wed, 21 Aug 2024 11:01:33 +0300 Subject: [PATCH 31/46] Fix wrong name for Trends --- k6/script.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/k6/script.js b/k6/script.js index 75352e6d7..5a705d377 100644 --- a/k6/script.js +++ b/k6/script.js @@ -44,52 +44,52 @@ export const options = { export function accounts() { const response = http.get(`${BASE_URL}/accounts`); - accountsApiCallTrened.add(response.timings.duration); + accountsApiCallTrend.add(response.timings.duration); } export function blocks() { const response = http.get(`${BASE_URL}/blocks`); - blocksApiCallTrened.add(response.timings.duration); + blocksApiCallTrend.add(response.timings.duration); } export function mexPairs() { const response = http.get(`${BASE_URL}/mex/pairs`); - nodesApiCallTrened.add(response.timings.duration); + nodesApiCallTrend.add(response.timings.duration); } export function mexTokens() { const response = http.get(`${BASE_URL}/mex/tokens`); - nodesApiCallTrened.add(response.timings.duration); + nodesApiCallTrend.add(response.timings.duration); } export function mexFarms() { const response = http.get(`${BASE_URL}/mex/farms`); - nodesApiCallTrened.add(response.timings.duration); + nodesApiCallTrend.add(response.timings.duration); } export function nodes() { const response = http.get(`${BASE_URL}/nodes`); - nodesApiCallTrened.add(response.timings.duration); + nodesApiCallTrend.add(response.timings.duration); } export function nodesAuctions() { const response = http.get(`${BASE_URL}/nodes/auctions`); - nodesApiCallTrened.add(response.timings.duration); + nodesApiCallTrend.add(response.timings.duration); } export function pool() { const response = http.get(`${BASE_URL}/pool`); - nodesApiCallTrened.add(response.timings.duration); + nodesApiCallTrend.add(response.timings.duration); } export function tokens() { const response = http.get(`${BASE_URL}/tokens`); - tokensApiCallTrened.add(response.timings.duration); + tokensApiCallTrend.add(response.timings.duration); } export function transactions() { const response = http.get(`${BASE_URL}/transactions`); - transactionsApiCallTrened.add(response.timings.duration); + transactionsApiCallTrend.add(response.timings.duration); } export function handleSummary(data) { From 53e350813100d17cdd528d3575314f3bcb02bfeb Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Wed, 21 Aug 2024 11:10:26 +0300 Subject: [PATCH 32/46] Add empty line at end of file --- k6/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k6/script.js b/k6/script.js index 5a705d377..e3a6c4cfd 100644 --- a/k6/script.js +++ b/k6/script.js @@ -96,4 +96,4 @@ export function handleSummary(data) { return { 'k6/output/summary.json': JSON.stringify(data), }; -} \ No newline at end of file +} From 9c7b8fed71636e692eae7ce94b9c05b1aa22473c Mon Sep 17 00:00:00 2001 From: Nicolae Mogage Date: Wed, 21 Aug 2024 11:17:26 +0300 Subject: [PATCH 33/46] Fix wrong trend calls --- k6/script.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/k6/script.js b/k6/script.js index e3a6c4cfd..73a1e9d92 100644 --- a/k6/script.js +++ b/k6/script.js @@ -54,17 +54,17 @@ export function blocks() { export function mexPairs() { const response = http.get(`${BASE_URL}/mex/pairs`); - nodesApiCallTrend.add(response.timings.duration); + mexPairsApiCallTrend.add(response.timings.duration); } export function mexTokens() { const response = http.get(`${BASE_URL}/mex/tokens`); - nodesApiCallTrend.add(response.timings.duration); + mexTokensApiCallTrend.add(response.timings.duration); } export function mexFarms() { const response = http.get(`${BASE_URL}/mex/farms`); - nodesApiCallTrend.add(response.timings.duration); + mexFarmsApiCallTrend.add(response.timings.duration); } export function nodes() { @@ -74,12 +74,12 @@ export function nodes() { export function nodesAuctions() { const response = http.get(`${BASE_URL}/nodes/auctions`); - nodesApiCallTrend.add(response.timings.duration); + nodesAuctionsApiCallTrend.add(response.timings.duration); } export function pool() { const response = http.get(`${BASE_URL}/pool`); - nodesApiCallTrend.add(response.timings.duration); + poolApiCallTrend.add(response.timings.duration); } export function tokens() { From 147e2b64480a5ae6b4e6292576ca3958b261e9f2 Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 10 Sep 2024 12:09:41 +0300 Subject: [PATCH 34/46] Changed actions/upload-artifacts from v2 to v3 --- .github/workflows/load-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index e30a245c5..9127cd4c7 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -56,7 +56,7 @@ jobs: run: k6 run ./k6/script.js - name: Upload result file for base branch - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: base-results path: k6/output/summary.json @@ -117,7 +117,7 @@ jobs: run: k6 run ./k6/script.js - name: Upload result file for head branch - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: head-results path: k6/output/summary.json From 6c16703295e48ca102c6b81c9293cfd0864ee2b4 Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 10 Sep 2024 12:30:36 +0300 Subject: [PATCH 35/46] changed actions/download-artifact from v2 to v3 --- .github/workflows/load-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 9127cd4c7..d0d6b7804 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -133,7 +133,7 @@ jobs: - uses: actions/checkout@v2 - name: Download all artifacts - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: path: artifacts From a2d9167c765ba967df11057cbb1919998120d32a Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 10 Sep 2024 12:41:44 +0300 Subject: [PATCH 36/46] Clear docker images caching in workflow --- .github/workflows/load-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index d0d6b7804..bf2cbe4b3 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -28,6 +28,9 @@ jobs: - name: Copy devnet config file from src to dist run: cp ./config/config.devnet.yaml ./dist/config/config.yaml + - name: Clear cache for docker images + run: docker system prune -af + - name: Start docker services run: docker compose up -d From 833addfd4cac98031b40b2a7c4c12a8be85db8c9 Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 10 Sep 2024 13:12:09 +0300 Subject: [PATCH 37/46] removed unncessary clear docker images cache --- .github/workflows/load-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index bf2cbe4b3..d0d6b7804 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -28,9 +28,6 @@ jobs: - name: Copy devnet config file from src to dist run: cp ./config/config.devnet.yaml ./dist/config/config.yaml - - name: Clear cache for docker images - run: docker system prune -af - - name: Start docker services run: docker compose up -d From 5d26ad371af6175bab1192099a1e2e9ebf0ca81e Mon Sep 17 00:00:00 2001 From: cfaur09 Date: Tue, 10 Sep 2024 13:37:21 +0300 Subject: [PATCH 38/46] Update load-tests.yml --- .github/workflows/load-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index d0d6b7804..301b317e3 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: ${{ github.event.pull_request.base.sha }} + ref: ${{ github.event.pull_request.head.sha }} - name: Set up Node.js uses: actions/setup-node@v2 From bdc2c813545ae38c0f1a70a6ab2d4289dec3156e Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 10 Sep 2024 14:04:56 +0300 Subject: [PATCH 39/46] Update load-test.yml --- .github/workflows/load-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 301b317e3..d0d6b7804 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.base.sha }} - name: Set up Node.js uses: actions/setup-node@v2 From f139cb7a18791a34585cfb78959aaf27d2f01c29 Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 10 Sep 2024 15:35:05 +0300 Subject: [PATCH 40/46] updated preload.js path --- .github/workflows/load-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index d0d6b7804..2a0edb52a 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -50,7 +50,7 @@ jobs: done - name: Preload cache - run: k6 run ./k6/preload.js + run: k6 run ../../k6/preload.js - name: Run k6 Load Test run: k6 run ./k6/script.js From 88cf4a9cea9cf4eaa88b89c22932e85126bf005b Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 10 Sep 2024 15:39:44 +0300 Subject: [PATCH 41/46] update path for preload.js --- .github/workflows/load-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 2a0edb52a..d0d6b7804 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -50,7 +50,7 @@ jobs: done - name: Preload cache - run: k6 run ../../k6/preload.js + run: k6 run ./k6/preload.js - name: Run k6 Load Test run: k6 run ./k6/script.js From 5b041bb8d677537a5ce06c6bc382ab4e4a25e0d3 Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Tue, 10 Sep 2024 15:42:14 +0300 Subject: [PATCH 42/46] test --- .github/workflows/load-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index d0d6b7804..5fe5086e5 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: ${{ github.event.pull_request.base.sha }} + ref: ${{ github.event.pull_request.head.sha }} - name: Set up Node.js uses: actions/setup-node@v2 @@ -48,7 +48,7 @@ jobs: echo 'Waiting for API...' sleep 1 done - + - name: Preload cache run: k6 run ./k6/preload.js From a1decebf664988837c28731d511b7c0d98c06ea4 Mon Sep 17 00:00:00 2001 From: cfaur09 Date: Tue, 10 Sep 2024 15:48:19 +0300 Subject: [PATCH 43/46] disable preload cache --- .github/workflows/load-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 5fe5086e5..27a1d9265 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -48,9 +48,9 @@ jobs: echo 'Waiting for API...' sleep 1 done - - - name: Preload cache - run: k6 run ./k6/preload.js + + # - name: Preload cache + # run: k6 run ./k6/preload.js - name: Run k6 Load Test run: k6 run ./k6/script.js @@ -131,7 +131,7 @@ jobs: needs: [test-base, test-head] steps: - uses: actions/checkout@v2 - + - name: Download all artifacts uses: actions/download-artifact@v3 with: From 609e11dfdccf69790afbd141f8b24e75aec97464 Mon Sep 17 00:00:00 2001 From: cfaur09 Date: Tue, 10 Sep 2024 15:50:24 +0300 Subject: [PATCH 44/46] revert ref base --- .github/workflows/load-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 27a1d9265..9e61565cc 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.base.sha }} - name: Set up Node.js uses: actions/setup-node@v2 From 10c56b80d0737cec3f68647b2ff33ce1e990385e Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Wed, 11 Sep 2024 10:03:55 +0300 Subject: [PATCH 45/46] run action for PRs to main or development only --- .github/workflows/load-tests.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index 9e61565cc..fb40d6b32 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -1,7 +1,10 @@ name: Load Tests -on: [pull_request] - +on: + pull_request: + branches: + - main + - development jobs: test-base: runs-on: ubuntu-latest @@ -49,8 +52,8 @@ jobs: sleep 1 done - # - name: Preload cache - # run: k6 run ./k6/preload.js + - name: Preload cache + run: k6 run ./k6/preload.js - name: Run k6 Load Test run: k6 run ./k6/script.js From 2b41e613a4ac2b2ec7b639a9668edeb778e0242a Mon Sep 17 00:00:00 2001 From: GuticaStefan Date: Wed, 11 Sep 2024 10:45:52 +0300 Subject: [PATCH 46/46] update load-tests.yml --- .github/workflows/load-tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/load-tests.yml b/.github/workflows/load-tests.yml index fb40d6b32..4bda65fd4 100644 --- a/.github/workflows/load-tests.yml +++ b/.github/workflows/load-tests.yml @@ -1,10 +1,11 @@ name: Load Tests on: + push: + branches: [main, development] pull_request: - branches: - - main - - development + branches: [main, development] + jobs: test-base: runs-on: ubuntu-latest