From 4c81ac0c59e1e3632abadc1d9f811899eac21b74 Mon Sep 17 00:00:00 2001 From: Mark Callaghan Date: Sat, 22 Aug 2015 12:18:00 -0700 Subject: [PATCH] Fix benchmark report script Summary: db_bench output now displays Percentile many times with --statistics after read IO latency histograms were added. So I only need the last one in the report output. Task ID: # Blame Rev: Test Plan: run run_flash_bench.sh Revert Plan: Database Impact: Memcache Impact: Other Notes: EImportant: - begin *PUBLIC* platform impact section - Bugzilla: # - end platform impact - Reviewers: igor Reviewed By: igor Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D45093 --- tools/benchmark.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/benchmark.sh b/tools/benchmark.sh index 76b9ff703..3c862fd15 100755 --- a/tools/benchmark.sh +++ b/tools/benchmark.sh @@ -120,11 +120,11 @@ function summarize_result { wamp=$( echo "scale=1; $sum_wgb / $lo_wgb" | bc ) wmb_ps=$( echo "scale=1; ( $sum_wgb * 1024.0 ) / $uptime" | bc ) usecs_op=$( grep ^${bench_name} $test_out | awk '{ printf "%.1f", $3 }' ) - p50=$( grep "^Percentiles:" $test_out | awk '{ printf "%.1f", $3 }' ) - p75=$( grep "^Percentiles:" $test_out | awk '{ printf "%.1f", $5 }' ) - p99=$( grep "^Percentiles:" $test_out | awk '{ printf "%.0f", $7 }' ) - p999=$( grep "^Percentiles:" $test_out | awk '{ printf "%.0f", $9 }' ) - p9999=$( grep "^Percentiles:" $test_out | awk '{ printf "%.0f", $11 }' ) + p50=$( grep "^Percentiles:" $test_out | tail -1 | awk '{ printf "%.1f", $3 }' ) + p75=$( grep "^Percentiles:" $test_out | tail -1 | awk '{ printf "%.1f", $5 }' ) + p99=$( grep "^Percentiles:" $test_out | tail -1 | awk '{ printf "%.0f", $7 }' ) + p999=$( grep "^Percentiles:" $test_out | tail -1 | awk '{ printf "%.0f", $9 }' ) + p9999=$( grep "^Percentiles:" $test_out | tail -1 | awk '{ printf "%.0f", $11 }' ) echo -e "$ops_sec\t$mb_sec\t$sum_size\t$lo_wgb\t$sum_wgb\t$wamp\t$wmb_ps\t$usecs_op\t$p50\t$p75\t$p99\t$p999\t$p9999\t$uptime\t$stall_time\t$stall_pct\t$test_name" \ >> $output_dir/report.txt }