Skip to content
Snippets Groups Projects
Commit ca13b311 authored by Ralf Jung's avatar Ralf Jung
Browse files

use /usr/bin/time to collect runtime and memory

parent 8693ed7d
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,6 @@ set -e
# Wrapper script to use perf as TIMECMD for the build.
VFILE="${!#}"
perf stat -o "$VFILE.perf.tmp" -x ';' -e instructions,cycles -- "$@"
(echo "## $VFILE" && (cat "$VFILE.perf.tmp" | egrep -v '^(# .*)?$') && echo) > "$VFILE.perf"
rm "$VFILE.perf.tmp"
LC_ALL=C /usr/bin/time -o "$VFILE.time" -f "real: %e, user: %U, sys: %S, mem: %M kB" -- perf stat -o "$VFILE.counters" -x ';' -e instructions,cycles -- "$@"
(echo "## $VFILE" && (cat "$VFILE.counters" | egrep -v '^(# .*)?$') && cat "$VFILE.time" && echo) > "$VFILE.perf"
rm "$VFILE.counters" "$VFILE.time"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment