Add benchmark target to Makefile and save timings
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
TIMINGS_FILE=/tmp/osrm.timings
|
||||
NAME=$1
|
||||
CMD=${@:2}
|
||||
START=$(date "+%s.%N")
|
||||
/bin/bash -c "$CMD"
|
||||
END=$(date "+%s.%N")
|
||||
TIME="$(echo "$END - $START" | bc)s"
|
||||
NEW_ENTRY="$NAME\t$TIME\t$(date -Iseconds)"
|
||||
|
||||
echo -e "$NEW_ENTRY" >> $TIMINGS_FILE
|
||||
Reference in New Issue
Block a user