fix regression test

Summary:
fix regression test by not reporting stats when building db
Closes https://github.com/facebook/rocksdb/pull/2390

Differential Revision: D5159909

Pulled By: lightmark

fbshipit-source-id: c3f4b9deb9c6799ff84207fd341c529144f8158d
This commit is contained in:
Aaron Gao 2017-05-31 15:33:02 -07:00 committed by Facebook Github Bot
parent 9c9909bf7d
commit 9b3ed83506
2 changed files with 10 additions and 7 deletions

View File

@ -177,7 +177,8 @@ DEFINE_string(
"\ttimeseries -- 1 writer generates time series data "
"and multiple readers doing random reads on id\n\n"
"Meta operations:\n"
"\tcompact -- Compact the entire DB\n"
"\tcompact -- Compact the entire DB; If multiple, randomly choose one\n"
"\tcompactall -- Compact the entire DB\n"
"\tstats -- Print DB stats\n"
"\tresetstats -- Reset DB stats\n"
"\tlevelstats -- Print the number of files and bytes per level\n"

View File

@ -130,10 +130,9 @@ function main {
DB_PATH=$ORIGIN_PATH
test_remote "test -d $DB_PATH"
if [[ $? -ne 0 ]]; then
run_remote "rm -rf $DB_PATH"
echo "Building DB..."
run_db_bench "fillseq" $NUM_KEYS 1 0
run_db_bench "compactall"
# compactall alone will not print ops or threads, which will fail update_report
run_db_bench "fillseq,compactall" $NUM_KEYS 1 0 0
fi
DB_PATH=$tmp
fi
@ -198,13 +197,15 @@ function init_arguments {
# $2 --- number of operations. Default: $NUM_KEYS
# $3 --- number of threads. Default $NUM_THREADS
# $4 --- use_existing_db. Default: 1
# $5 --- update_report. Default: 1
function run_db_bench {
# this will terminate all currently-running db_bench
find_db_bench_cmd="ps aux | grep db_bench | grep -v grep | grep -v aux | awk '{print \$2}'"
USE_EXISTING_DB=${4:-1}
ops=${2:-$NUM_OPS}
threads=${3:-$NUM_THREADS}
USE_EXISTING_DB=${4:-1}
UPDATE_REPORT=${5:-1}
echo ""
echo "======================================================================="
echo "Benchmark $1"
@ -266,8 +267,9 @@ function run_db_bench {
echo $cmd
eval $cmd
exit_on_error $db_bench_error
if [ $UPDATE_REPORT -ne 0 ]; then
update_report "$1" "$RESULT_PATH/$1" $ops $threads
fi
}
function build_checkpoint {