22 lines
547 B
Bash
Executable File
22 lines
547 B
Bash
Executable File
#!/bin/sh
|
|
# AGENT: Seeds exactly 10,000 synthetic messages into a dedicated chat and runs
|
|
# EXPLAIN (ANALYZE, BUFFERS) using the API's keyset predicate. Output goes to
|
|
# stdout so it can be stored in evidence/explain.txt.
|
|
set -eu
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
if [ ! -f .env ]; then
|
|
echo "seed_and_explain.sh: .env is missing" >&2
|
|
exit 2
|
|
fi
|
|
|
|
set -a
|
|
# shellcheck disable=SC1091
|
|
. ./.env
|
|
set +a
|
|
|
|
docker compose --env-file .env exec -T postgres \
|
|
psql -v ON_ERROR_STOP=1 -U "${POSTGRES_USER}" -d "${POSTGRES_DB}" \
|
|
< scripts/seed_10k.sql
|