Skip to content

Instantly share code, notes, and snippets.

@saboyutaka
Created October 7, 2017 15:59
Show Gist options
  • Save saboyutaka/e3a2f389c6025081849eac440891df19 to your computer and use it in GitHub Desktop.
Save saboyutaka/e3a2f389c6025081849eac440891df19 to your computer and use it in GitHub Desktop.
benchmark for ishocon portal
#!/bin/sh
WORKLOAD=$1
TEAM=$2
echo $WORKLOAD
SCORE=`./benchmark --workload $1 | awk '$0 ~ /Score: /{print $4}'`
JSON="{ \"score\": ${SCORE}, \"timestamp\":{ \".sv\":\"timestamp\" } }"
if [ -n $SCORE ]; then
curl -X POST -d "${JSON}" "https://ishocon-a9d93.firebaseio.com/teams/${TEAM}.json"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment