Skip to content

Instantly share code, notes, and snippets.

@Emerentius Emerentius/test.sh
Created Nov 29, 2017

Embed
What would you like to do?
Test cargo incr comp
#!/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
You can’t perform that action at this time.