Skip to content

Instantly share code, notes, and snippets.

@armon
Created April 16, 2011 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armon/630a6a074d1a5ee8d2b0 to your computer and use it in GitHub Desktop.
Save armon/630a6a074d1a5ee8d2b0 to your computer and use it in GitHub Desktop.
Benchmark script for Heap implementations
#!/bin/bash
PROGS="test-arr test-indr"
COUNTS="1000000 5000000 10000000 50000000 100000000"
TRIES="1 2 3"
echo "" >> bench.log
echo "##### `date`" >>bench.log
echo "" >> bench.log
for COUNT in $COUNTS
do
for PROG in $PROGS
do
echo "$PROG $COUNT"
CMD="time ./$PROG $COUNT"
for TRY in $TRIES
do
$CMD >>bench.log
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment