diff options
author | cos <cos> | 2019-12-11 18:06:25 +0100 |
---|---|---|
committer | cos <cos> | 2019-12-11 18:06:25 +0100 |
commit | 0ce19fa7cd9b69ca1d49e6122d6f028740a0668c (patch) | |
tree | 70ac5aaf4321f545655bb9d4241b6461a5747494 /2019/rust/day07 | |
parent | 4c6c41b055d857f7dc2599262720a83da8d215be (diff) | |
download | adventofcode-0ce19fa7cd9b69ca1d49e6122d6f028740a0668c.zip |
Add execution time measurement scripts
Diffstat (limited to '2019/rust/day07')
-rwxr-xr-x | 2019/rust/day07/both_parts.sh | 2 | ||||
-rwxr-xr-x | 2019/rust/day07/calibrate_amplifiers.sh | 2 | ||||
-rwxr-xr-x | 2019/rust/day07/calibrate_amplifiers_with_feedback.sh | 12 | ||||
-rwxr-xr-x | 2019/rust/day07/part_one.sh | 1 | ||||
-rwxr-xr-x | 2019/rust/day07/part_two.sh | 1 |
5 files changed, 11 insertions, 7 deletions
diff --git a/2019/rust/day07/both_parts.sh b/2019/rust/day07/both_parts.sh new file mode 100755 index 0000000..7a91b46 --- /dev/null +++ b/2019/rust/day07/both_parts.sh @@ -0,0 +1,2 @@ +./part_one.sh +./part_two.sh diff --git a/2019/rust/day07/calibrate_amplifiers.sh b/2019/rust/day07/calibrate_amplifiers.sh index 917dfa7..07dd2e1 100755 --- a/2019/rust/day07/calibrate_amplifiers.sh +++ b/2019/rust/day07/calibrate_amplifiers.sh @@ -19,7 +19,7 @@ for A in `seq 0 4`; do [ ${C} -ne ${E} ] || continue [ ${D} -ne ${E} ] || continue - O=`RUST_BACKTRACE=1 ../target/debug/day07 \ + O=`../target/release/day07 \ --mode arg --program input "${A},${I},${B},${C},${D},${E}"` V=`echo "${O}" | tail -1` [ "${H}" -ge "${V}" ] || { diff --git a/2019/rust/day07/calibrate_amplifiers_with_feedback.sh b/2019/rust/day07/calibrate_amplifiers_with_feedback.sh index 7a3a896..2506746 100755 --- a/2019/rust/day07/calibrate_amplifiers_with_feedback.sh +++ b/2019/rust/day07/calibrate_amplifiers_with_feedback.sh @@ -6,12 +6,12 @@ launch_chain() local p="input" (echo ${6}; (echo ${5}; (echo ${4}; (echo ${3}; (echo "${2} - ${1}" > "${input_file}";tail -f "${input_file}")| RUST_BACKTRACE=1 \ - ../target/debug/day07 --mode stdio --program "${p}") | \ - ../target/debug/day07 --mode stdio --program "${p}") | \ - ../target/debug/day07 --mode stdio --program "${p}") | \ - ../target/debug/day07 --mode stdio --program "${p}") | \ - ../target/debug/day07 --mode stdio --program "${p}" >> "${input_file}" + ${1}" > "${input_file}";tail -f "${input_file}")| \ + ../target/release/day07 --mode stdio --program "${p}") | \ + ../target/release/day07 --mode stdio --program "${p}") | \ + ../target/release/day07 --mode stdio --program "${p}") | \ + ../target/release/day07 --mode stdio --program "${p}") | \ + ../target/release/day07 --mode stdio --program "${p}" >> "${input_file}" tail -1 "${input_file}" } diff --git a/2019/rust/day07/part_one.sh b/2019/rust/day07/part_one.sh new file mode 100755 index 0000000..e1d0a3d --- /dev/null +++ b/2019/rust/day07/part_one.sh @@ -0,0 +1 @@ +./calibrate_amplifiers.sh diff --git a/2019/rust/day07/part_two.sh b/2019/rust/day07/part_two.sh new file mode 100755 index 0000000..b22df15 --- /dev/null +++ b/2019/rust/day07/part_two.sh @@ -0,0 +1 @@ +./calibrate_amplifiers_with_feedback.sh |