#!/bin/sh
set -e
PROJDIR=$(cd `dirname $0`/.. && pwd)
cd ${PROJDIR}

PAT="."
if [ ! -z "${1}" ]; then
    PAT="${1}"
fi

go test -bench ${PAT} -benchmem -cpuprofile cpu.out
go tool pprof gron.test cpu.out
