Created
November 29, 2017 05:35
-
-
Save Emerentius/e15380b90c7723501fe9e4a08f8538b5 to your computer and use it in GitHub Desktop.
Test cargo incr comp
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 | |
cargo +nightly build --release 2> /dev/null | |
rm -rf ./target/ | |
echo 'full build' > timings.txt | |
(time cargo +nightly build --release 2>/dev/null) 2>> timings.txt | |
export CARGO_INCREMENTAL=1 | |
rm -rf ./target/ | |
echo -e '\nfull incremental build' >> timings.txt | |
(time cargo +nightly build --release 2>/dev/null) 2>> timings.txt | |
touch ./src/lib.rs | |
echo -e '\ntouch lib.rs' >> timings.txt | |
(time cargo +nightly build --release 2>/dev/null) 2>> timings.txt | |
echo '#[allow(unused)] fn noop() {}' >> ./src/lib.rs | |
echo -e '\nadd noop' >> timings.txt | |
(time cargo +nightly build --release 2>/dev/null) 2>> timings.txt | |
# reset to earlier state | |
git checkout src/lib.rs | |
cat timings.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment