Created
August 23, 2018 13:00
-
-
Save disassembler/225e64839c5b27ac258537a6494e1d96 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
performance-metrics() { | |
thingname=$1 | |
shift | |
if [ -n "${enablePhaseMetrics:-}" ]; then | |
TIMEFORMAT="time.$thingname.user %U | |
time.$thingname.system %S | |
time.$thingname.real %R" | |
exec {fd}<&2; time ( $@ 2>&$fd; ) 2>> ~/metrics; exec {fd}<&- | |
else | |
"$@" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment