Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit dde05ea

Browse files
committed
boilerplate for nancy prepare-workload
1 parent 3b1d25c commit dde05ea

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

nancy_prepare_workload.sh

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,48 @@
22

33
DEBUG=0
44

5-
echo "ok!"
5+
## Get command line params
6+
while true; do
7+
case "$1" in
8+
help )
9+
echo -e "\033[1mCOMMAND\033[22m
10+
11+
run
12+
13+
\033[1mDESCRIPTION\033[22m
14+
15+
Nancy is a member of Postgres.ai's Artificial DBA team responsible for
16+
conducting experiments.
17+
18+
Use 'nancy prepare-workload' to prepare real-world workload based on Postgres
19+
logs from any of your real Postgres server.
20+
21+
WIP! Not finished. More details TBD later.
22+
23+
\033[1mSEE ALSO\033[22m
24+
" | less -RFX
25+
exit ;;
26+
-d | --debug ) DEBUG=1; shift ;;
27+
--db-name )
28+
DB_NAME="$2"; shift 2 ;;
29+
-- )
30+
>&2 echo "ERROR: Invalid option '$1'"
31+
exit 1
32+
break ;;
33+
* )
34+
if [ "${1:0:2}" == "--" ]; then
35+
>&2 echo "ERROR: Invalid option '$1'. Please double-check options."
36+
exit 1
37+
else
38+
INPUT="$1"
39+
fi
40+
break ;;
41+
esac
42+
done
43+
44+
if [ $DEBUG -eq 1 ]; then
45+
echo "debug: ${DEBUG}"
46+
echo "input: ${INPUT}"
47+
echo "output: ${OUTPUT}"
48+
echo "db_name: ${DB_NAME}"
49+
fi

0 commit comments

Comments
 (0)