From 19942834bd814128d6ffab526093674ab7d37d9f Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Fri, 13 Dec 2024 20:19:48 +0000 Subject: [PATCH] revert compilation_report changes and do not funnel benchmark codegen output into grep --- test_programs/compilation_report.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_programs/compilation_report.sh b/test_programs/compilation_report.sh index a26488edf25..b5be74cac15 100755 --- a/test_programs/compilation_report.sh +++ b/test_programs/compilation_report.sh @@ -31,17 +31,17 @@ for dir in ${tests_to_profile[@]}; do # The default package to run is the supplied list hardcoded at the top of the script PACKAGE_NAME=$dir - # If a specific package name has been provided use that name - if [ "$#" -eq 2 ]; then - PACKAGE_NAME=$2 # Otherwise default to the current directory as the package we want to run - elif [ "$#" -ne 0 ]; then + if [ "$#" -ne 0 ]; then PACKAGE_NAME=$(basename $current_dir) fi echo $PACKAGE_NAME - COMPILE_TIME=$((time nargo compile --force --silence-warnings --package $PACKAGE_NAME --benchmark-codegen) 2>&1 | grep real | grep -oE '[0-9]+m[0-9]+.[0-9]+s') + # Compile again just for benchmarking purposes + time nargo compile --force --silence-warnings --benchmark-codegen + + COMPILE_TIME=$((time nargo compile --force --silence-warnings) 2>&1 | grep real | grep -oE '[0-9]+m[0-9]+.[0-9]+s') echo -e " {\n \"artifact_name\":\"$PACKAGE_NAME\",\n \"time\":\"$COMPILE_TIME\"" >> $current_dir/compilation_report.json if (($ITER == $NUM_ARTIFACTS)); then