Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions benchmarks/run-comparison.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,12 @@ run_contestant() {
local outfile="$TMPDIR/${label}_run${run}.txt"
echo -n " $label run $run/$RUNS... "

if timeout "$TIMEOUT_SEC" "$@" > "$outfile" 2>&1; then
local total
total=$(grep "Total Time:" "$outfile" | grep -o '[0-9]*' || echo "999999999")
timeout "$TIMEOUT_SEC" "$@" > "$outfile" 2>&1 &
wait $! 2>/dev/null || true

local total
total=$(grep "Total Time:" "$outfile" | grep -o '[0-9]*' || echo "")
if [ -n "$total" ] && [ "$total" -gt 0 ] 2>/dev/null; then
echo "${total} ms"
if [ "$total" -lt "$best_total" ]; then
best_total=$total
Expand Down Expand Up @@ -280,13 +283,21 @@ fi
if [ "$HAVE_EMU" -eq 1 ]; then
EMUROOT="-r$ROOT"

# The emulator doesn't exit after running a dis file, so use a shorter
# timeout. The benchmark completes in well under 60s; timeout then kills
# the lingering emulator process.
SAVED_TIMEOUT=$TIMEOUT_SEC
TIMEOUT_SEC=60

run_contestant "Limbo_JIT" "$EMU" "$EMUROOT" -c1 dis/jitbench.dis
JIT_FILE=$BEST_FILE
echo ""

run_contestant "Limbo_Interp" "$EMU" "$EMUROOT" -c0 dis/jitbench.dis
INTERP_FILE=$BEST_FILE
echo ""

TIMEOUT_SEC=$SAVED_TIMEOUT
fi

# --- Parse best-run results into per-contestant files ---
Expand Down
Binary file modified dis/9660srv.dis
Binary file not shown.
Binary file modified dis/calc.dis
Binary file not shown.
Binary file modified dis/disdep.dis
Binary file not shown.
Binary file modified dis/emuinit.dis
Binary file not shown.
Binary file modified dis/fc.dis
Binary file not shown.
Binary file modified dis/gzip.dis
Binary file not shown.
Binary file modified dis/iostats.dis
Binary file not shown.
Binary file modified dis/jitbench.dis
Binary file not shown.
Binary file modified dis/jitbench2.dis
Binary file not shown.
Binary file added dis/jitbug.dis
Binary file not shown.
Binary file added dis/jitbug2.dis
Binary file not shown.
Binary file added dis/jitshift.dis
Binary file not shown.
Binary file added dis/jittest.dis
Binary file not shown.
Binary file modified dis/js.dis
Binary file not shown.
Binary file modified dis/lib/bufio.dis
Binary file not shown.
Binary file modified dis/lib/login.dis
Binary file not shown.
Binary file modified dis/lib/menuhit.dis
Binary file not shown.
Binary file modified dis/lib/midi.dis
Binary file not shown.
Binary file modified dis/lib/parseman.dis
Binary file not shown.
Binary file modified dis/lib/profile.dis
Binary file not shown.
Binary file modified dis/lib/readjpg.dis
Binary file not shown.
Binary file modified dis/lib/string.dis
Binary file not shown.
Binary file modified dis/lib/testing.dis
Binary file not shown.
Binary file modified dis/lib/tkclient.dis
Binary file not shown.
Binary file modified dis/lib/wmclient.dis
Binary file not shown.
Binary file modified dis/lib/wmlib.dis
Binary file not shown.
Binary file modified dis/lib/xml.dis
Binary file not shown.
Binary file modified dis/man2html.dis
Binary file not shown.
Binary file modified dis/seq.dis
Binary file not shown.
Binary file added dis/test9p.dis
Binary file not shown.
Binary file modified dis/time.dis
Binary file not shown.
Binary file modified dis/units.dis
Binary file not shown.
Binary file added utils/mk/mk
Binary file not shown.
Loading