Created
January 27, 2019 21:33
-
-
Save yamafaktory/a3512b379c8caf7fd999ac7c25d0a1df to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
# Clone the repository | |
REMOTE_URL="$(git config --get remote.origin.url)"; | |
cd ${TRAVIS_BUILD_DIR}/.. && \ | |
git clone ${REMOTE_URL} "${TRAVIS_REPO_SLUG}-bench" && \ | |
cd "${TRAVIS_REPO_SLUG}-bench" && \ | |
# Bench master | |
git checkout master && \ | |
cargo bench --bench benchmark -- --noplot --save-baseline before && \ | |
# Bench current branch | |
git checkout ${TRAVIS_COMMIT} && \ | |
cargo bench --bench benchmark -- --noplot --save-baseline after && \ | |
# Install https://github.com/BurntSushi/critcmp | |
cargo install critcmp --force && \ | |
# Compare the two generated benches | |
critcmp before after; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment