test/blobfs: consolidate run_tests.sh into rocksdb.sh
move the main portion of run_tests.sh into rocksdb.sh to simplify rocksdb testing and allow for the provision of more granular timing coverage. Change-Id: I60649394c496a347f4dca948d1d499ad8578c4a0 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/378827 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
19de08066d
commit
9290e0bcf7
@ -2,6 +2,21 @@
|
||||
|
||||
set -ex
|
||||
|
||||
run_step() {
|
||||
if [ -z "$1" ]; then
|
||||
echo run_step called with no parameter
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "--spdk=$ROCKSDB_CONF" >> "$1"_flags.txt
|
||||
echo "--spdk_bdev=Nvme0n1" >> "$1"_flags.txt
|
||||
echo "--spdk_cache_size=$CACHE_SIZE" >> "$1"_flags.txt
|
||||
|
||||
echo -n Start $1 test phase...
|
||||
/usr/bin/time taskset 0xFFF $DB_BENCH --flagfile="$1"_flags.txt &> "$1"_db_bench.txt
|
||||
echo done.
|
||||
}
|
||||
|
||||
testdir=$(readlink -f $(dirname $0))
|
||||
rootdir=$(readlink -f $testdir/../../..)
|
||||
source $rootdir/scripts/autotest_common.sh
|
||||
@ -33,7 +48,58 @@ trap 'rm -f $ROCKSDB_CONF; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
$rootdir/test/lib/blobfs/mkfs/mkfs $ROCKSDB_CONF Nvme0n1
|
||||
mkdir $output_dir/rocksdb
|
||||
RESULTS_DIR=$output_dir/rocksdb USE_PERF=0 DURATION=30 NUM_KEYS=50000000 ROCKSDB_CONF=$ROCKSDB_CONF $testdir/run_tests.sh $DB_BENCH
|
||||
RESULTS_DIR=$output_dir/rocksdb
|
||||
DURATION=30
|
||||
NUM_KEYS=50000000
|
||||
CACHE_SIZE=4096
|
||||
|
||||
cd $RESULTS_DIR
|
||||
|
||||
cp $testdir/common_flags.txt insert_flags.txt
|
||||
echo "--benchmarks=fillseq" >> insert_flags.txt
|
||||
echo "--threads=1" >> insert_flags.txt
|
||||
echo "--disable_wal=1" >> insert_flags.txt
|
||||
echo "--use_existing_db=0" >> insert_flags.txt
|
||||
echo "--num=$NUM_KEYS" >> insert_flags.txt
|
||||
|
||||
cp $testdir/common_flags.txt randread_flags.txt
|
||||
echo "--benchmarks=readrandom" >> randread_flags.txt
|
||||
echo "--threads=16" >> randread_flags.txt
|
||||
echo "--duration=$DURATION" >> randread_flags.txt
|
||||
echo "--disable_wal=1" >> randread_flags.txt
|
||||
echo "--use_existing_db=1" >> randread_flags.txt
|
||||
echo "--num=$NUM_KEYS" >> randread_flags.txt
|
||||
|
||||
cp $testdir/common_flags.txt overwrite_flags.txt
|
||||
echo "--benchmarks=overwrite" >> overwrite_flags.txt
|
||||
echo "--threads=1" >> overwrite_flags.txt
|
||||
echo "--duration=$DURATION" >> overwrite_flags.txt
|
||||
echo "--disable_wal=1" >> overwrite_flags.txt
|
||||
echo "--use_existing_db=1" >> overwrite_flags.txt
|
||||
echo "--num=$NUM_KEYS" >> overwrite_flags.txt
|
||||
|
||||
cp $testdir/common_flags.txt readwrite_flags.txt
|
||||
echo "--benchmarks=readwhilewriting" >> readwrite_flags.txt
|
||||
echo "--threads=4" >> readwrite_flags.txt
|
||||
echo "--duration=$DURATION" >> readwrite_flags.txt
|
||||
echo "--disable_wal=1" >> readwrite_flags.txt
|
||||
echo "--use_existing_db=1" >> readwrite_flags.txt
|
||||
echo "--num=$NUM_KEYS" >> readwrite_flags.txt
|
||||
|
||||
cp $testdir/common_flags.txt writesync_flags.txt
|
||||
echo "--benchmarks=overwrite" >> writesync_flags.txt
|
||||
echo "--threads=1" >> writesync_flags.txt
|
||||
echo "--duration=$DURATION" >> writesync_flags.txt
|
||||
echo "--disable_wal=0" >> writesync_flags.txt
|
||||
echo "--use_existing_db=1" >> writesync_flags.txt
|
||||
echo "--sync=1" >> writesync_flags.txt
|
||||
echo "--num=$NUM_KEYS" >> writesync_flags.txt
|
||||
|
||||
run_step insert
|
||||
run_step overwrite
|
||||
run_step readwrite
|
||||
run_step writesync
|
||||
run_step randread
|
||||
|
||||
trap - SIGINT SIGTERM EXIT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user