From: Jérémie Astor Date: Fri, 17 Jan 2020 00:24:21 +0000 (+0100) Subject: allow pref X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=8c6f1c6ed2ca339a8797eb87d14fcfee90542486;p=gwion.git allow pref --- diff --git a/scripts/benchmark.sh b/scripts/benchmark.sh index 92bcc650..01e1ff80 100644 --- a/scripts/benchmark.sh +++ b/scripts/benchmark.sh @@ -9,8 +9,8 @@ plot_script="scripts/bench.plot" run() { echo "$1 $3 $2" >&2 echo "perf stat -r$repeats $1 $test_dir/$3.$2" -# sudo echo -1 > /proc/sys/kernel/perf_event_paranoid - sudo perf stat -r"$repeats" "$1" "$test_dir/$3.$2" 2>&1 | grep "time elapsed" | + echo 1 | sudo -a tee /proc/sys/kernel/perf_event_paranoid + perf stat -r"$repeats" "$1" "$test_dir/$3.$2" 2>&1 | grep "time elapsed" | sed 's/ *\([0-9]*\),\([0-9]*\) .* seconds time elapsed *( +- *\([0-9]*\),\([0-9]*\)% )/\1.\2 \3.\4/' }