From d678ab7580fd97f70c943c10a60a0cab685598b5 Mon Sep 17 00:00:00 2001 From: AJ Schmidt Date: Mon, 31 Jan 2022 15:26:08 -0500 Subject: [PATCH] replace `bc` with `awk` for float math --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 47a0a3d19b4..2c8219ecacf 100755 --- a/build.sh +++ b/build.sh @@ -218,7 +218,7 @@ if buildAll || hasArg libcudf; then if [[ "$BUILD_REPORT_INCL_CACHE_STATS" == "ON" && -x "$(command -v sccache)" ]]; then COMPILE_REQUESTS=$(sccache -s | grep "Compile requests " | awk '{ print $NF }') # "grep" cmd has 2 spaces to avoid matching "Compile requests executed" CACHE_HITS=$(sccache -s | grep "Cache hits" | awk '{ print $NF }') - HIT_RATE=$(echo "scale=2; $CACHE_HITS/$COMPILE_REQUESTS*100" | bc) + HIT_RATE=$(echo - | awk "{printf \"%.2f\n\", $CACHE_HITS / $COMPILE_REQUESTS * 100}") MSG="${MSG}
cache hit rate ${HIT_RATE} %" fi MSG="${MSG}
parallel setting: $PARALLEL_LEVEL"