Skip to content

Commit cd65952

Browse files
authored
chore: improve some make targets (#717)
pgbench_short and pgbench_long should use configured port. db_start should start in the background
1 parent 3cf04d9 commit cd65952

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ db_migrate:
5656
mix ecto.migrate --prefix _supavisor --log-migrator-sql
5757

5858
db_start:
59-
docker-compose -f ./docker-compose.db.yml up
59+
docker-compose -f ./docker-compose.db.yml up -d
6060

6161
db_stop:
6262
docker-compose -f ./docker-compose.db.yml down --remove-orphans
@@ -76,10 +76,10 @@ pgbench_init:
7676
PGPASSWORD=postgres pgbench -i -h 127.0.0.1 -p 6432 -U postgres -d postgres
7777

7878
pgbench_short:
79-
PGPASSWORD=postgres pgbench -M extended --transactions 5 --jobs 4 --client 1 -h localhost -p 6543 -U postgres.sys postgres
79+
PGPASSWORD=postgres pgbench -M extended --transactions 5 --jobs 4 --client 1 -h localhost -p $(PGBENCH_PORT) -U $(PGBENCH_USER) postgres
8080

8181
pgbench_long:
82-
PGPASSWORD=postgres pgbench -M extended --transactions 100 --jobs 10 --client 60 -h localhost -p 7654 -U transaction.localhost postgres
82+
PGPASSWORD=postgres pgbench -M extended --transactions 100 --jobs 10 --client 60 -h localhost -p $(PGBENCH_PORT) -U $(PGBENCH_USER) postgres
8383

8484
pgbench:
8585
PGPASSWORD="postgres" pgbench \

0 commit comments

Comments
 (0)