Last active
May 4, 2019 17:22
-
-
Save eleniums/03f534fcda60ade02a20df73ddc3097c to your computer and use it in GitHub Desktop.
Script to run benchmarks for Go.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
if [ -z "$BENCH_TIME" ] | |
then | |
export BENCH_TIME=10s | |
fi | |
if [ -z "$BENCH" ] | |
then | |
export BENCH=. | |
fi | |
go test -v -run=^$ -bench=$BENCH -benchtime=$BENCH_TIME -memprofile=mem.prof -cpuprofile=cpu.prof ./test $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment