Make go get to install work.
This commit is contained in:
7
internal/scripts/bench.sh
Executable file
7
internal/scripts/bench.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
if brew ls --versions wrk > /dev/null; then
|
||||
wrk -t12 -c400 -d30s --timeout 10s --script=query.lua --latency http://localhost:8080/api/v1/graphql
|
||||
else
|
||||
brew install wek
|
||||
wrk -t12 -c400 -d30s --timeout 10s --script=query.lua --latency http://localhost:8080/api/v1/graphql
|
||||
fi
|
3
internal/scripts/query.lua
Normal file
3
internal/scripts/query.lua
Normal file
@ -0,0 +1,3 @@
|
||||
wrk.method = "POST"
|
||||
wrk.headers["Content-Type"] = "application/json"
|
||||
wrk.body = [[{"query":" { products( limit: 30, order_by: { price: desc }, distinct: [ price ] where: { id: { and: { greater_or_equals: 20, lt: 28 } } }) { id name price user { id email } } } "}]]
|
13
internal/scripts/start.sh
Executable file
13
internal/scripts/start.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
if [ $1 = "secrets" ]
|
||||
then
|
||||
./sops --config ./config "${@:2}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -f "./config/$SECRETS_FILE"
|
||||
then
|
||||
./sops --config ./config exec-env "./config/$SECRETS_FILE" "$*"
|
||||
else
|
||||
$@
|
||||
fi
|
Reference in New Issue
Block a user