1
0
Fork 0
mirror of synced 2025-09-23 04:08:33 +00:00
ZoKrates/scripts/benchmark.sh
2021-02-23 14:38:12 +01:00

13 lines
288 B
Bash
Executable file

#!/bin/bash
# Usage: benchmark.sh <command>
# For MacOS: install gtime with homebrew `brew install gnu-time`
cmd=$*
format="mem=%KK rss=%MK elapsed=%E cpu=%P cpu.sys=%S inputs=%I outputs=%O"
if command -v gtime; then
gtime -f "$format" $cmd
else
/usr/bin/time -f "$format" $cmd
fi