Skip to content

Commit d6ad55e

Browse files
committed
WIP
1 parent 4f91b1e commit d6ad55e

2 files changed

Lines changed: 53 additions & 37 deletions

File tree

.github/workflows/continuous-benchmark-transfer.yaml

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ on:
77
description: 'Dataset name'
88
default: 'dbpedia-openai-1M-1536-angular'
99
type: string
10-
qdrant_version:
11-
description: 'Version of qdrant to benchmark (ghcr/dev, docker/v1.7.0)'
12-
default: 'ghcr/dev'
10+
qdrant_versions:
11+
description: 'Comma-separated versions (ghcr/dev, docker/master, docker/v1.13.0)'
12+
default: 'ghcr/dev,docker/master'
1313
type: string
1414
region:
1515
description: 'Hetzner region'
@@ -19,11 +19,18 @@ on:
1919
description: 'Hetzner server type'
2020
default: 'cpx41'
2121
type: string
22-
schedule:
23-
- cron: "0 4 * * *" # Daily at 4am UTC
22+
client_type:
23+
description: 'Hetzner client type'
24+
default: 'cpx32'
25+
type: string
26+
push:
27+
branches:
28+
- transfer-speed-benchmark
29+
# schedule:
30+
# - cron: "0 4 * * *" # Daily at 4am UTC
2431

2532
concurrency:
26-
group: transfer-benchmark
33+
group: hetzner-machines
2734

2835
env:
2936
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
@@ -69,7 +76,7 @@ jobs:
6976
uses: ./.github/workflows/actions/create-server-with-retry
7077
with:
7178
server_name: transfer-bench-client-${{ github.run_id }}
72-
server_type: cpx32
79+
server_type: ${{ inputs.client_type }}
7380
region: ${{ inputs.region }}
7481

7582
runBenchmark:
@@ -82,44 +89,49 @@ jobs:
8289
- uses: webfactory/ssh-agent@v0.8.0
8390
with:
8491
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
85-
- name: Parse qdrant version
86-
id: parse_version
87-
run: |
88-
QDRANT_VERSION="${{ inputs.qdrant_version }}"
89-
90-
case "${QDRANT_VERSION}" in
91-
docker/*)
92-
CONTAINER_REGISTRY="docker.io"
93-
VERSION=${QDRANT_VERSION#docker/}
94-
;;
95-
ghcr/*)
96-
CONTAINER_REGISTRY="ghcr.io"
97-
VERSION=${QDRANT_VERSION#ghcr/}
98-
;;
99-
*)
100-
echo "Error: unknown version ${QDRANT_VERSION}. Version name should start with 'docker/' or 'ghcr/'"
101-
exit 1
102-
;;
103-
esac
104-
105-
echo "registry=${CONTAINER_REGISTRY}" >> $GITHUB_OUTPUT
106-
echo "version=${VERSION}" >> $GITHUB_OUTPUT
10792
- name: Create inventory
10893
uses: ./.github/workflows/actions/create-inventory
10994
with:
11095
hcloud_token: ${{ secrets.HCLOUD_TOKEN }}
11196
server_names: ${{ needs.setupCluster.outputs.node_names }}
11297
client_names: ${{ needs.setupCluster.outputs.client_name }}
11398
db_host: ${{ secrets.POSTGRES_HOST }}
114-
- name: Run bench
99+
- name: Run benchmarks for all versions
115100
run: |
116-
cd ansible/playbooks
117-
ansible-playbook playbook-transfer-speed.yml \
118-
-i inventory.ini \
119-
--extra-vars "
120-
dataset_name=${{ inputs.dataset_name }}
121-
servers=[{'name':'qdrant','registry':'${{ steps.parse_version.outputs.registry }}','image':'qdrant/qdrant','version':'${{ steps.parse_version.outputs.version }}'}]
122-
"
101+
VERSIONS="${{ inputs.qdrant_versions }}"
102+
VERSIONS="${VERSIONS:-ghcr/dev,docker/latest}"
103+
104+
IFS=',' read -ra VERSION_ARRAY <<< "$VERSIONS"
105+
for QDRANT_VERSION in "${VERSION_ARRAY[@]}"; do
106+
QDRANT_VERSION=$(echo "$QDRANT_VERSION" | xargs) # trim whitespace
107+
echo "=========================================="
108+
echo "Benchmarking Qdrant version: $QDRANT_VERSION"
109+
echo "=========================================="
110+
111+
case "${QDRANT_VERSION}" in
112+
docker/*)
113+
CONTAINER_REGISTRY="docker.io"
114+
VERSION=${QDRANT_VERSION#docker/}
115+
;;
116+
ghcr/*)
117+
CONTAINER_REGISTRY="ghcr.io"
118+
VERSION=${QDRANT_VERSION#ghcr/}
119+
;;
120+
*)
121+
echo "Error: unknown version ${QDRANT_VERSION}. Version name should start with 'docker/' or 'ghcr/'"
122+
exit 1
123+
;;
124+
esac
125+
126+
cd ansible/playbooks
127+
ansible-playbook playbook-transfer-speed.yml \
128+
-i inventory.ini \
129+
--extra-vars "
130+
dataset_name=${{ inputs.dataset_name }}
131+
servers=[{'name':'qdrant','registry':'${CONTAINER_REGISTRY}','image':'qdrant/qdrant','version':'${VERSION}'}]
132+
"
133+
cd ../..
134+
done
123135
env:
124136
ANSIBLE_HOST_KEY_CHECKING: "False"
125137

.github/workflows/manual-benchmarks-cascade.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ on:
4040
server_machine_type:
4141
description: "Hetzner server machine type to run the benchmarks in"
4242
default: "cpx41"
43+
44+
concurrency:
45+
group: hetzner-machines
46+
4347
env:
4448
# Common environment variables
4549
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}

0 commit comments

Comments
 (0)