forked from mtusi2026/mtusi2026lab2
feat(app) lab2 prepared for mr
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user