From bde2cc46949814b6b1a0aaecd7ff695a68ef2a7f Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Wed, 8 Nov 2023 02:19:42 +0100 Subject: [PATCH] Create k6-qryn-tempo.yml --- .github/workflows/k6-qryn-tempo.yml | 68 +++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/k6-qryn-tempo.yml diff --git a/.github/workflows/k6-qryn-tempo.yml b/.github/workflows/k6-qryn-tempo.yml new file mode 100644 index 0000000..45c0890 --- /dev/null +++ b/.github/workflows/k6-qryn-tempo.yml @@ -0,0 +1,68 @@ +name: K6 Loki qxip/qryn +on: + workflow_dispatch: + inputs: + qryn_tag: + description: 'Build/Tag for qryn (latest)' + required: false + clickhouse_tag: + description: 'BuildTag for ClickHouse (latest)' + required: false + +jobs: + build: + name: Run k6 on qryn:latest + runs-on: ubuntu-latest + env: + QRYN_VERSION: "clickhouse/clickhouse-server:${{ github.event.inputs.qryn_tag || 'latest' }}" + CLICKHOUSE_VERSION: "qxip/qryn:${{ github.event.inputs.clickhouse_tag || 'latest' }}" + services: + clickhouse: + image: "clickhouse/clickhouse-server:${{ github.event.inputs.clickhouse_tag || 'latest' }}" + ports: + - 8123:8123 + qryn: + image: "qxip/qryn:${{ github.event.inputs.qryn_tag || 'latest' }}" + ports: + - 3100:3100 + env: + CLICKHOUSE_SERVER: clickhouse + + steps: + - name: Checkout + uses: actions/checkout@v4 + - 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-tracing -O k6 + chmod +x k6 + - name: Run k6 loki test + run: ./k6 run --out csv=results.csv tempo/qryn-tempo-loadtest.js + env: + K6_TEMPO_ENDPOINT: "localhost:3100" + K6_VUS: 1 + K6_DURATION_MINUTES: 1 + K6_INTERVAL: 15 + - 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: | + results.csv + summary.html + summary.md + 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 "clickhouse/clickhouse-server:${{ github.event.inputs.clickhouse_tag || 'latest' }}" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + cat summary.txt >> $GITHUB_STEP_SUMMARY