forked from ClickHouse/ClickBench
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 2.2 KB
/
axiom-clickbench.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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