Created
March 18, 2021 00:54
-
-
Save mattjj/0145392a1141f068f72f5ea096e90908 to your computer and use it in GitHub Desktop.
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 | |
current_branch=$(git branch --show-current) | |
base=${1:-master} | |
alt=${2:-${current_branch}} | |
bench=${3:-benchmarks/api_benchmark.py} | |
rest="${@:4}" | |
git checkout ${base} | |
python ${bench} --benchmark_format=json --benchmark_out=${base}.json ${rest} | |
git checkout ${alt} | |
python ${bench} --benchmark_format=json --benchmark_out=${alt}.json ${rest} | |
~/packages/benchmark/tools/compare.py benchmarks ${base}.json ${alt}.json | |
git checkout ${current_branch} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment