Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
36 lines (31 sloc)
1.11 KB
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
#!/bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
function run_shootout() { | |
RUN_PREFIX="$1" | |
OUTPUT_NAME="$2" | |
for f in data_feeds*.pcap; do | |
echo "$f" >> "$OUTPUT_NAME" | |
echo $RUN_PREFIX ./target/release/md_shootout -f "$f" | |
sudo $RUN_PREFIX ./target/release/md_shootout -f "$f" >> "$OUTPUT_NAME" | |
done | |
} | |
PREFIXES=( | |
"|shootout_normal.txt" # No CPU Pinning | |
"taskset 2|shootout_taskset.txt" # Pin to CPU 1 | |
"taskset 2 nice -n-19|shootout_nice.txt" # Pin to CPU 2 with highest priority | |
# Kinda dangerous, caused the processor to lock when running in graphical session, | |
# but seemed OK in runlevel 3 until the kernel switched time sources | |
#"taskset 2 chrt -f 99|shootout_chrt.txt" # Pin to CPU 3 with real-time priority | |
) | |
RUN_COUNT=10 | |
for prefix in "${PREFIXES[@]}"; do | |
( | |
RUN_PREFIX="$(echo "$prefix" | cut -d'|' -f1)" | |
OUTPUT_NAME="$(echo "$prefix" | cut -d'|' -f2)" | |
rm "$OUTPUT_NAME" | |
for i in $(seq 1 $RUN_COUNT); do | |
run_shootout "$RUN_PREFIX" "$OUTPUT_NAME" | |
done | |
) | |
wait | |
done |