If you have docker, it's easiest to run a Postgres container:
docker run -d \
--name postgres \
--net=host \
-e POSTGRES_PASSWORD=true \
--expose 5432 \
postgres:11
Put the DB URI, password etc into local-pg.conf
here; I configured a separate user per the PostgREST guide.
To query the container IP address:
docker inspect -f '{{.NetworkSettings.IPAddress}}' postgres
Install from source with profiling to have threadscope
graphs.
git clone https://github.com/PostgREST/postgrest
cd postgrest
stack build --profile --ghc-options='-threaded -eventlog'
go get github.com/tsenart/vegeta
or brew install vegeta
or grab a binary from GitHub
https://github.com/iovisor/bpftrace
sudo -v; RPS=1000 DURATION=20s ./run.sh