From e3a3f794e63606f473aa8dd42589d19a35c6cbd9 Mon Sep 17 00:00:00 2001 From: Allan Jeremy Date: Wed, 8 Jun 2022 13:34:01 +0300 Subject: [PATCH] Debug WIP: Updated run with cachegrind script --- scripts/run-with-cachegrind.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/run-with-cachegrind.sh b/scripts/run-with-cachegrind.sh index 9fca54b4..c0dfb7bd 100644 --- a/scripts/run-with-cachegrind.sh +++ b/scripts/run-with-cachegrind.sh @@ -25,10 +25,17 @@ now_ms() { ITERATION_COUNT=$4 START_TIME=$(now_ms) +ARGS=( "$@" ) +REST_ARGS="${ARGS[@]:4}" + valgrind \ --quiet \ --tool=cachegrind \ - "$1" $2 >/dev/null + "$1" "$2" "$REST_ARGS">/dev/null + +ARGS=( "$@" ) +REST_ARGS="${ARGS[@]:4}" + TIME_ELAPSED=$(bc <<< "$(now_ms) - ${START_TIME}")