From c648d90f8e52e4e3c38e38a539d8e23fe062726a Mon Sep 17 00:00:00 2001 From: Young Tack Jin Date: Wed, 10 Oct 2018 21:01:41 -0700 Subject: [PATCH] benchmark.sh: to fix divide by zero runtime error (#4442) Summary: "Write (GB)" of $9 rather than "Rnp1 (GB)" of $8 Pull Request resolved: https://github.com/facebook/rocksdb/pull/4442 Differential Revision: D10318193 Pulled By: yiwu-arbug fbshipit-source-id: 03a7ef1938d9332e06fb3fd8490ca212f61fac6b --- tools/benchmark.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/benchmark.sh b/tools/benchmark.sh index 6d0920490..0ba1081e1 100755 --- a/tools/benchmark.sh +++ b/tools/benchmark.sh @@ -151,8 +151,8 @@ function summarize_result { stall_pct=$( grep "^Cumulative stall" $test_out| tail -1 | awk '{ print $5 }' ) ops_sec=$( grep ^${bench_name} $test_out | awk '{ print $5 }' ) mb_sec=$( grep ^${bench_name} $test_out | awk '{ print $7 }' ) - lo_wgb=$( grep "^ L0" $test_out | tail -1 | awk '{ print $8 }' ) - sum_wgb=$( grep "^ Sum" $test_out | tail -1 | awk '{ print $8 }' ) + lo_wgb=$( grep "^ L0" $test_out | tail -1 | awk '{ print $9 }' ) + sum_wgb=$( grep "^ Sum" $test_out | tail -1 | awk '{ print $9 }' ) sum_size=$( grep "^ Sum" $test_out | tail -1 | awk '{ printf "%.1f", $3 / 1024.0 }' ) wamp=$( echo "scale=1; $sum_wgb / $lo_wgb" | bc ) wmb_ps=$( echo "scale=1; ( $sum_wgb * 1024.0 ) / $uptime" | bc )