From 0fcdc68493f7b4dd39e929a73c8881a8e1af2be0 Mon Sep 17 00:00:00 2001 From: Daniel Harvey Date: Wed, 15 Nov 2023 12:32:27 +0000 Subject: [PATCH] We can run them --- benchmarks/component/docker-compose.yaml | 63 +++++------------------- benchmarks/component/start.sh | 2 +- 2 files changed, 12 insertions(+), 53 deletions(-) diff --git a/benchmarks/component/docker-compose.yaml b/benchmarks/component/docker-compose.yaml index 7042a95c..0b8843a8 100644 --- a/benchmarks/component/docker-compose.yaml +++ b/benchmarks/component/docker-compose.yaml @@ -1,6 +1,6 @@ version: "3.6" -name: ndc-postgres-component-benchmarks +name: ndc-sqlserver-component-benchmarks services: benchmark: @@ -47,29 +47,11 @@ services: target: /home/k6/output sqlserver: - image: mcr.microsoft.com/mssql/server:2019-latest - platform: linux/amd64 + extends: + file: ../../docker-compose.yaml + service: sqlserver ports: - 1433 - environment: - ACCEPT_EULA: "Y" - MSSQL_PID: "Developer" - MSSQL_SA_PASSWORD: "Password!" - SA_PASSWORD: "Password!" - volumes: - - /var/opt/mssql - - type: bind - source: ../../static - target: /static - healthcheck: - test: - - CMD-SHELL - - | - /opt/mssql-tools/bin/sqlcmd -U SA -P "$$SA_PASSWORD" - start_period: 5s - interval: 5s - timeout: 10s - retries: 20 agent: image: ghcr.io/hasura/ndc-sqlserver:dev @@ -82,6 +64,7 @@ services: CONFIGURATION_FILE: "/deployment.json" # we don't care about traces right now, and the benchmarks flood the batch buffer OTEL_TRACES_SAMPLER: "always_off" + PORT: 8100 volumes: - type: bind source: ./generated/deployment.json @@ -96,56 +79,32 @@ services: timeout: 1s retries: 30 depends_on: - postgres: + sqlserver: condition: service_started agent-configuration: - image: ghcr.io/hasura/ndc-postgres:dev + image: ghcr.io/hasura/ndc-sqlserver:dev command: - configuration - serve init: true ports: - 9100 + environment: + PORT: 9100 healthcheck: test: - CMD - - ndc-postgres + - ndc-sqlserver - check-health - --port=9100 interval: 1s timeout: 1s retries: 30 depends_on: - postgres: + sqlserver: condition: service_started - postgres: - image: postgis/postgis:${POSTGRESQL_VERSION:-16}-3.4 - platform: linux/amd64 - command: - - -F # turn fsync off for speed - - -N 1000 # increase max connections from 100 so we can run more HGEs - ports: - - 5432 - environment: - POSTGRES_PASSWORD: "password" - volumes: - - type: tmpfs - target: /var/lib/postgresql/data - - type: bind - source: ../../static/chinook-postgres.sql - target: /docker-entrypoint-initdb.d/chinook-postgres.sql - read_only: true - healthcheck: - test: - - CMD-SHELL - - psql -U "$${POSTGRES_USER:-postgres}" < /dev/null && sleep 5 && psql -U "$${POSTGRES_USER:-postgres}" < /dev/null - start_period: 5s - interval: 5s - timeout: 10s - retries: 20 - # k6 will push statistics to Prometheus prometheus: image: prom/prometheus diff --git a/benchmarks/component/start.sh b/benchmarks/component/start.sh index a07d808e..49e4fc7c 100755 --- a/benchmarks/component/start.sh +++ b/benchmarks/component/start.sh @@ -41,7 +41,7 @@ SQLSERVER_CONNECTION_STRING="DRIVER={ODBC Driver 18 for SQL Server};SERVER=127.0 echo "${SQLSERVER_CONNECTION_STRING}" -../../scripts/new-configuration.sh localhost:9100 "${SQLSERVER_CONNECTION_STRING}" +../../scripts/new-configuration.sh localhost:9100 "${SQLSERVER_CONNECTION_STRING}" \ > ./generated/deployment.json kill "$AGENT_PID" && wait "$AGENT_PID" || : rm -f ./agent.pid