Skip to content

Clickbench Axiom DB #26254

Clickbench Axiom DB

Clickbench Axiom DB #26254

name: Clickbench Axiom DB
on:
push:
branches:
- main
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
jobs:
clickbench:
runs-on: ubuntu-latest
env:
AXIOM_URL: ${{ secrets.AXIOM_URL }}
AXIOM_ORG_ID: ${{ secrets.AXIOM_ORG_ID }}
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
AXIOM_TRACE_URL: ${{ secrets.AXIOM_TRACE_URL }}
AXIOM_RESULTS_DATASET: ${{ secrets.AXIOM_RESULTS_DATASET }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: axiom
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'axiom/go.mod'
cache-dependency-path: 'axiom/go.sum'
- name: Format Check
working-directory: axiom
run: |
set -euo pipefail
go install golang.org/x/tools/cmd/goimports@latest
goimports -w .
git diff --exit-code
- name: Vet
working-directory: axiom
run: |
go vet ./...
- name: Run axiom-clickbench
working-directory: axiom
run: |
set -euo pipefail
go build
./axiom run -iters=1 -trace-url=$AXIOM_TRACE_URL -no-cache=true -no-superblocks=false -label="clickbench" < queries.apl > events.json
./axiom run -iters=1 -trace-url=$AXIOM_TRACE_URL -no-cache=false -no-superblocks=false -label="clickbench" < queries.apl >> events.json
# In another life, we'd wire server versions through services and their middleware and back out in
# a response header of the original query. Alas, we do the hacky thing today.
echo "Sleeping 90s to let traces propagate, yolo"
sleep 90
./axiom server-versions -trace-url=$AXIOM_TRACE_URL < events.json | gzip > events.json.gz
- name: Ingest events into results dataset
working-directory: axiom
run: |
set -euo pipefail
go install github.com/axiomhq/cli/cmd/axiom@latest
axiom ingest $AXIOM_RESULTS_DATASET \
--content-type ndjson \
--content-encoding gzip \
--file events.json.gz