Skip to content

Pre release

Pre release #103

Workflow file for this run

name: K6 Test qxip/qryn
on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
- '**.yml'
- '**.yaml'
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
- '**.yml'
- '**.yaml'
workflow_dispatch:
inputs:
qryn_tag:
description: 'Build/Tag for qryn (latest)'
required: false
clickhouse_tag:
description: 'BuildTag for ClickHouse (latest)'
required: false
clickhouse_image:
description: 'Image for ClickHouse (clickhouse/clickhouse-server)'
required: false
jobs:
build:
name: Run k6 on qryn:latest
runs-on: ubuntu-latest
continue-on-error: true
env:
CLICKHOUSE_VERSION: "${{ github.event.inputs.clickhouse_image || 'clickhouse/clickhouse-server' }}:${{ github.event.inputs.clickhouse_tag || 'latest' }}"
QRYN_VERSION: "ghcr.io/metrico/qryn:${{ github.event.inputs.qryn_tag || 'latest' }}"
services:
clickhouse:
image: "${{ github.event.inputs.clickhouse_image || 'clickhouse/clickhouse-server' }}:${{ github.event.inputs.clickhouse_tag || 'latest' }}"
ports:
- 8123:8123
env:
PORT: 8123
CLICKHOUSE_USER: qryn
CLICKHOUSE_PASSWORD: qryn
qryn:
image: "ghcr.io/metrico/qryn:${{ github.event.inputs.qryn_tag || 'latest' }}"
ports:
- 3100:3100
env:
CLICKHOUSE_SERVER: clickhouse
CLICKHOUSE_AUTH: "qryn:qryn"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: metrico/qryn-bench
path: .
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Download k6 for Prometheus
run: |
wget https://github.com/metrico/qryn-bench/releases/download/latest/k6
chmod +x k6
- name: Download k6 for Prometheus
run: |
wget https://github.com/metrico/qryn-bench/releases/download/latest/k6-tracing -O k6-tracing
chmod +x k6-tracing
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1.8.7
- name: Wait for Loki API
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:3100/loki/api/v1/label"
expected-response-field: "status"
expected-response-field-value: "success"
timeout: 30
- name: Run k6 loki test
run: ./k6 run --out csv=results.csv loki/qryn-loki-loadtest.js
env:
K6_VUS: 1
K6_ITERACTIONS: 50
- run: mv summary.txt loki_summary.txt
- name: Wait for Prom API
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:3100/api/v1/query"
expected-response-field: "status"
expected-response-field-value: "success"
timeout: 30
- name: Run k6 prometheus test
run: ./k6 run --out csv=results.csv prometheus/qryn-loadtest.js
env:
K6_WRITE_HOSTNAME: "localhost:3100"
K6_READ_HOSTNAME: "localhost:3100"
K6_WRITE_REQUEST_RATE: 1
K6_WRITE_SERIES_PER_REQUEST: 10
K6_READ_REQUEST_RATE: 1
K6_DURATION_MIN: 1
K6_SCRAPE_INTERVAL_SECONDS: 30
RAMP_UP_MIN: 0
- run: mv summary.txt prom_summary.txt
- name: Wait for Tempo API
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:3100/api/search/tags"
- name: Run k6 tempo test
run: ./k6-tracing run --out csv=results.csv tempo/qryn-tempo-template.js
env:
K6_TEMPO_ENDPOINT: "http://localhost:3100"
K6_VUS: 1
K6_DURATION_MINUTES: 1
K6_ITERATIONS: 20
- run: mv summary.txt tempo_summary.txt
- name: Strip Text report
run: |
sed -i 's/[^[:print:]]/*/' *_summary.txt
sed -i 's/[\d128-\d255]//g' *_summary.txt
- uses: actions/upload-artifact@v3
with:
name: results
path: |
loki_summary.txt
prom_summary.txt
tempo_summary.txt
- name: Summary Report
run: |
echo "### qryn image" >> $GITHUB_STEP_SUMMARY
echo "qxip/qryn:${{ github.event.inputs.qryn_tag || 'latest' }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### clickhouse image" >> $GITHUB_STEP_SUMMARY
echo "${{ github.event.inputs.clickhouse_image || 'clickhouse/clickhouse-server' }}:${{ github.event.inputs.clickhouse_tag || 'latest' }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Loki Test" >> $GITHUB_STEP_SUMMARY
cat loki_summary.txt >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Prometheus Test" >> $GITHUB_STEP_SUMMARY
cat prom_summary.txt >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Tempo Test" >> $GITHUB_STEP_SUMMARY
cat tempo_summary.txt >> $GITHUB_STEP_SUMMARY
- name: Pull Docker logs
run: |
docker logs "${{ job.services.clickhouse.id }}"
docker logs "${{ job.services.qryn.id }}"