From fd1cfc0df5a606f524f3ed624273704182fa4d7d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 24 Feb 2025 01:19:44 +0100 Subject: [PATCH] bench.sh --- ...ec7e0504b068ffa8bb185d9384ce1422fd3d1.json | 14 ++++++ benchmarks/bench.sh | 43 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 backend/.sqlx/query-d8186f0cee285aa50db7626409aec7e0504b068ffa8bb185d9384ce1422fd3d1.json create mode 100644 benchmarks/bench.sh diff --git a/backend/.sqlx/query-d8186f0cee285aa50db7626409aec7e0504b068ffa8bb185d9384ce1422fd3d1.json b/backend/.sqlx/query-d8186f0cee285aa50db7626409aec7e0504b068ffa8bb185d9384ce1422fd3d1.json new file mode 100644 index 0000000000..70872a1328 --- /dev/null +++ b/backend/.sqlx/query-d8186f0cee285aa50db7626409aec7e0504b068ffa8bb185d9384ce1422fd3d1.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "DELETE FROM audit WHERE timestamp <= now() - ($1::bigint::text || ' s')::interval", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "d8186f0cee285aa50db7626409aec7e0504b068ffa8bb185d9384ce1422fd3d1" +} diff --git a/benchmarks/bench.sh b/benchmarks/bench.sh new file mode 100644 index 0000000000..5e2837c2c6 --- /dev/null +++ b/benchmarks/bench.sh @@ -0,0 +1,43 @@ +curl -fsSL https://get.docker.com | sh +sudo usermod -aG docker $USER +newgrp docker + + +mkdir pg_logs +chmod 777 pg_logs + +sudo docker run --network=host -e POSTGRES_PASSWORD=changeme -e POSTGRES_USER=postgres -e POSTGRES_DB=windmill -e POSTGRES_INITDB_ARGS="-c log_duration=on -c log_statement=all -c log_min_duration_statement=0 -c shared_buffers=2GB -c work_mem=32MB -c effective_cache_size=4GB -c shared_preload_libraries=auto_explain -c auto_explain.log_min_duration=5 -c auto_explain.log_analyze=on -c auto_explain.log_timing=on -c auto_explain.log_buffers=on -c auto_explain.log_verbose=on \ + -c log_statement=all \ + -c log_min_duration_statement=0 \ + -c shared_buffers=2GB \ + -c work_mem=32MB \ + -c effective_cache_size=4GB \ + -c shared_preload_libraries=auto_explain \ + -c auto_explain.log_min_duration=5 \ + -c auto_explain.log_analyze=on \ + -c auto_explain.log_timing=on \ + -c auto_explain.log_buffers=on \ + -c auto_explain.log_verbose=on \ + -c auto_explain.log_nested_statements=on \ + -c logging_collector=on \ + -c log_directory='/var/log/postgresql' \ + -c log_filename='postgresql.log'" \ + -v ~/pg_logs:/var/log/postgresql \ + postgres + + +docker run -it --network=host -e DATABASE_URL=postgres://postgres:changeme@localhost/windmill ghcr.io/windmill-labs/windmill:main + + +curl -fsSL https://deno.land/install.sh | sh + +cat < suite.json +[ + { + "kind": "noop", + "jobs": 90000 + } +] +EOF + +deno run --unstable -A -r https://raw.githubusercontent.com/windmill-labs/windmill/main/benchmarks/benchmark_suite.ts -c suite.json