2019-09-04 06:09:04 +08:00
|
|
|
|
#!/usr/bin/env bash
|
2020-06-21 00:03:10 +08:00
|
|
|
|
if ! which make cc c++ tee lz4 >/dev/null; then
|
2020-05-26 20:11:32 +08:00
|
|
|
|
echo "Please install the following prerequisites: make cc c++ tee lz4 banner" >&2
|
2020-05-25 01:37:55 +08:00
|
|
|
|
exit 1
|
2019-07-13 02:27:34 +08:00
|
|
|
|
fi
|
|
|
|
|
|
2020-06-21 00:03:10 +08:00
|
|
|
|
BANNER="$(which banner 2>/dev/null | echo echo)"
|
2019-08-11 04:04:00 +08:00
|
|
|
|
UNAME="$(uname -s 2>/dev/null || echo Unknown)"
|
2020-06-21 00:03:10 +08:00
|
|
|
|
set -euo pipefail
|
2019-09-04 06:09:04 +08:00
|
|
|
|
|
2019-10-11 03:11:28 +08:00
|
|
|
|
## NOTE: Valgrind could produce some false-positive warnings
|
|
|
|
|
## in multi-process environment with shared memory.
|
|
|
|
|
## For instance, when the process "A" explicitly marks a memory
|
|
|
|
|
## region as "undefined", the process "B" fill it,
|
|
|
|
|
## and after this process "A" read such region, etc.
|
|
|
|
|
#VALGRIND="valgrind --trace-children=yes --log-file=valgrind-%p.log --leak-check=full --track-origins=yes --error-exitcode=42 --suppressions=test/valgrind_suppress.txt"
|
|
|
|
|
|
2019-09-04 06:09:04 +08:00
|
|
|
|
###############################################################################
|
|
|
|
|
# 1. clean data from prev runs and examine available RAM
|
|
|
|
|
|
2019-10-11 03:11:28 +08:00
|
|
|
|
if [[ -v VALGRIND && ! -z "$VALGRIND" ]]; then
|
2020-05-25 01:37:55 +08:00
|
|
|
|
rm -f valgrind-*.log
|
2019-10-11 03:11:28 +08:00
|
|
|
|
else
|
2020-05-25 01:37:55 +08:00
|
|
|
|
VALGRIND=time
|
2021-01-15 19:50:42 +08:00
|
|
|
|
export MALLOC_CHECK_=7 MALLOC_PERTURB_=42
|
2019-10-11 03:11:28 +08:00
|
|
|
|
fi
|
|
|
|
|
|
2019-09-04 06:09:04 +08:00
|
|
|
|
WANNA_MOUNT=0
|
2019-08-11 04:04:00 +08:00
|
|
|
|
case ${UNAME} in
|
2020-05-25 01:37:55 +08:00
|
|
|
|
Linux)
|
|
|
|
|
MAKE=make
|
|
|
|
|
if [[ ! -v TESTDB_DIR || -z "$TESTDB_DIR" ]]; then
|
|
|
|
|
for old_test_dir in $(ls -d /dev/shm/mdbx-test.[0-9]*); do
|
|
|
|
|
rm -rf $old_test_dir
|
|
|
|
|
done
|
|
|
|
|
TESTDB_DIR="/dev/shm/mdbx-test.$$"
|
|
|
|
|
fi
|
|
|
|
|
mkdir -p $TESTDB_DIR && rm -f $TESTDB_DIR/*
|
|
|
|
|
|
|
|
|
|
if LC_ALL=C free | grep -q -i available; then
|
|
|
|
|
ram_avail_mb=$(($(LC_ALL=C free | grep -i Mem: | tr -s [:blank:] ' ' | cut -d ' ' -f 7) / 1024))
|
|
|
|
|
else
|
|
|
|
|
ram_avail_mb=$(($(LC_ALL=C free | grep -i Mem: | tr -s [:blank:] ' ' | cut -d ' ' -f 4) / 1024))
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
FreeBSD)
|
|
|
|
|
MAKE=gmake
|
|
|
|
|
if [[ ! -v TESTDB_DIR || -z "$TESTDB_DIR" ]]; then
|
|
|
|
|
for old_test_dir in $(ls -d /tmp/mdbx-test.[0-9]*); do
|
|
|
|
|
umount $old_test_dir && rm -r $old_test_dir
|
|
|
|
|
done
|
|
|
|
|
TESTDB_DIR="/tmp/mdbx-test.$$"
|
|
|
|
|
rm -rf $TESTDB_DIR && mkdir -p $TESTDB_DIR
|
|
|
|
|
WANNA_MOUNT=1
|
|
|
|
|
else
|
|
|
|
|
mkdir -p $TESTDB_DIR && rm -f $TESTDB_DIR/*
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
ram_avail_mb=$(($(LC_ALL=C vmstat -s | grep -ie '[0-9] pages free$' | cut -d p -f 1) * ($(LC_ALL=C vmstat -s | grep -ie '[0-9] bytes per page$' | cut -d b -f 1) / 1024) / 1024))
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
Darwin)
|
|
|
|
|
MAKE=make
|
|
|
|
|
if [[ ! -v TESTDB_DIR || -z "$TESTDB_DIR" ]]; then
|
|
|
|
|
for vol in $(ls -d /Volumes/mdx[0-9]*[0-9]tst); do
|
|
|
|
|
disk=$(mount | grep $vol | cut -d ' ' -f 1)
|
|
|
|
|
echo "umount: volume $vol disk $disk"
|
|
|
|
|
hdiutil unmount $vol -force
|
|
|
|
|
hdiutil detach $disk
|
|
|
|
|
done
|
|
|
|
|
TESTDB_DIR="/Volumes/mdx$$tst"
|
|
|
|
|
WANNA_MOUNT=1
|
|
|
|
|
else
|
|
|
|
|
mkdir -p $TESTDB_DIR && rm -f $TESTDB_DIR/*
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
pagesize=$(($(LC_ALL=C vm_stat | grep -o 'page size of [0-9]\+ bytes' | cut -d' ' -f 4) / 1024))
|
|
|
|
|
freepages=$(LC_ALL=C vm_stat | grep '^Pages free:' | grep -o '[0-9]\+\.$' | cut -d'.' -f 1)
|
|
|
|
|
ram_avail_mb=$((pagesize * freepages / 1024))
|
|
|
|
|
echo "pagesize ${pagesize}K, freepages ${freepages}, ram_avail_mb ${ram_avail_mb}"
|
|
|
|
|
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
*)
|
|
|
|
|
echo "FIXME: ${UNAME} not supported by this script"
|
|
|
|
|
exit 2
|
|
|
|
|
;;
|
2019-08-11 04:04:00 +08:00
|
|
|
|
esac
|
2019-06-24 06:34:45 +08:00
|
|
|
|
|
2019-09-04 06:09:04 +08:00
|
|
|
|
###############################################################################
|
|
|
|
|
# 2. estimate reasonable RAM space for test-db
|
|
|
|
|
|
2019-08-11 04:04:00 +08:00
|
|
|
|
echo "=== ${ram_avail_mb}M RAM available"
|
|
|
|
|
ram_reserve4logs_mb=1234
|
|
|
|
|
if [ $ram_avail_mb -lt $ram_reserve4logs_mb ]; then
|
2020-05-25 01:37:55 +08:00
|
|
|
|
echo "=== At least ${ram_reserve4logs_mb}Mb RAM required"
|
|
|
|
|
exit 3
|
2019-06-24 06:34:45 +08:00
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# В режимах отличных от MDBX_WRITEMAP изменения до записи в файл
|
|
|
|
|
# будут накапливаться в памяти, что может потребовать свободной
|
|
|
|
|
# памяти размером с БД. Кроме этого, в тест входит сценарий
|
|
|
|
|
# создания копия БД на ходу. Поэтому БД не может быть больше 1/3
|
|
|
|
|
# от доступной памяти. Однако, следует учесть что malloc() будет
|
|
|
|
|
# не сразу возвращать выделенную память системе, а также
|
|
|
|
|
# предусмотреть места для логов.
|
|
|
|
|
#
|
|
|
|
|
# In non-MDBX_WRITEMAP modes, updates (dirty pages) will
|
|
|
|
|
# accumulate in memory before writing to the disk, which may
|
|
|
|
|
# require a free memory up to the size of a whole database. In
|
|
|
|
|
# addition, the test includes a script create a copy of the
|
|
|
|
|
# database on the go. Therefore, the database cannot be more 1/3
|
|
|
|
|
# of available memory. Moreover, should be taken into account
|
|
|
|
|
# that malloc() will not return the allocated memory to the
|
|
|
|
|
# system immediately, as well some space is required for logs.
|
|
|
|
|
#
|
2019-08-11 04:04:00 +08:00
|
|
|
|
db_size_mb=$(((ram_avail_mb - ram_reserve4logs_mb) / 4))
|
2020-05-26 20:46:52 +08:00
|
|
|
|
if [ $db_size_mb -gt 17408 ]; then
|
|
|
|
|
db_size_mb=17408
|
2019-06-27 15:53:35 +08:00
|
|
|
|
fi
|
2019-08-11 04:04:00 +08:00
|
|
|
|
echo "=== use ${db_size_mb}M for DB"
|
2019-06-24 06:34:45 +08:00
|
|
|
|
|
2019-09-04 06:09:04 +08:00
|
|
|
|
###############################################################################
|
|
|
|
|
# 3. Create test-directory in ramfs/tmpfs, i.e. create/format/mount if required
|
|
|
|
|
case ${UNAME} in
|
2020-05-25 01:37:55 +08:00
|
|
|
|
Linux)
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
FreeBSD)
|
|
|
|
|
if [[ WANNA_MOUNT ]]; then
|
|
|
|
|
mount -t tmpfs tmpfs $TESTDB_DIR
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
Darwin)
|
|
|
|
|
if [[ WANNA_MOUNT ]]; then
|
|
|
|
|
ramdisk_size_mb=$((42 + db_size_mb * 2 + ram_reserve4logs_mb))
|
|
|
|
|
number_of_sectors=$((ramdisk_size_mb * 2048))
|
|
|
|
|
ramdev=$(hdiutil attach -nomount ram://${number_of_sectors})
|
|
|
|
|
diskutil erasevolume ExFAT "mdx$$tst" ${ramdev}
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
*)
|
|
|
|
|
echo "FIXME: ${UNAME} not supported by this script"
|
|
|
|
|
exit 2
|
|
|
|
|
;;
|
2019-09-04 06:09:04 +08:00
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
# 4. Run basic test, i.e. `make check`
|
|
|
|
|
|
2019-09-10 19:32:17 +08:00
|
|
|
|
${MAKE} TEST_DB=${TESTDB_DIR}/smoke.db TEST_LOG=${TESTDB_DIR}/smoke.log check
|
2019-08-11 04:04:00 +08:00
|
|
|
|
rm -f ${TESTDB_DIR}/*
|
2019-06-24 06:34:45 +08:00
|
|
|
|
|
|
|
|
|
###############################################################################
|
2019-09-04 06:09:04 +08:00
|
|
|
|
# 5. run stochastic iterations
|
2019-06-24 06:34:45 +08:00
|
|
|
|
|
|
|
|
|
function join { local IFS="$1"; shift; echo "$*"; }
|
|
|
|
|
function bit2option { local -n arr=$1; (( ($2&(1<<$3)) != 0 )) && echo -n '+' || echo -n '-'; echo "${arr[$3]}"; }
|
|
|
|
|
|
2020-09-21 05:24:22 +08:00
|
|
|
|
syncmodes=("" ,+nosync-safe ,+nosync-utterly)
|
|
|
|
|
|
|
|
|
|
options=(writemap coalesce lifo notls perturb)
|
2019-06-24 06:34:45 +08:00
|
|
|
|
|
|
|
|
|
function bits2list {
|
2020-05-25 01:37:55 +08:00
|
|
|
|
local -n arr=$1
|
|
|
|
|
local i
|
|
|
|
|
local list=()
|
|
|
|
|
for ((i=0; i<${#arr[@]}; ++i)) do
|
|
|
|
|
list[$i]=$(bit2option $1 $2 $i)
|
|
|
|
|
done
|
|
|
|
|
join , "${list[@]}"
|
2019-06-24 06:34:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function probe {
|
2020-05-26 20:11:32 +08:00
|
|
|
|
echo "----------------------------------------------- $(date)"
|
2020-05-25 01:37:55 +08:00
|
|
|
|
echo "${caption}: $*"
|
|
|
|
|
rm -f ${TESTDB_DIR}/* \
|
2021-01-30 06:19:32 +08:00
|
|
|
|
&& ${VALGRIND} ./mdbx_test ${speculum} --ignore-dbfull --repeat=11 --pathname=${TESTDB_DIR}/long.db --cleanup-after=no "$@" \
|
2020-05-25 07:44:28 +08:00
|
|
|
|
| tee >(lz4 > ${TESTDB_DIR}/long.log.lz4) | grep -e reach -e achieve \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
&& ${VALGRIND} ./mdbx_chk ${TESTDB_DIR}/long.db | tee ${TESTDB_DIR}/long-chk.log \
|
|
|
|
|
&& ([ ! -e ${TESTDB_DIR}/long.db-copy ] || ${VALGRIND} ./mdbx_chk ${TESTDB_DIR}/long.db-copy | tee ${TESTDB_DIR}/long-chk-copy.log) \
|
|
|
|
|
|| (echo "FAILED"; exit 1)
|
2019-06-24 06:34:45 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-09-04 06:09:04 +08:00
|
|
|
|
#------------------------------------------------------------------------------
|
2019-06-24 06:34:45 +08:00
|
|
|
|
|
|
|
|
|
count=0
|
2020-05-25 01:37:55 +08:00
|
|
|
|
cases='?'
|
2021-01-30 06:19:32 +08:00
|
|
|
|
for nops in 10 33 100 333 1000 3333 10000 33333 100000 333333 1000000 3333333 10000000 33333333 100000000 333333333 1000000000; do
|
2020-05-26 20:11:32 +08:00
|
|
|
|
echo "======================================================================="
|
2021-01-30 06:19:32 +08:00
|
|
|
|
wbatch=$((nops / 7 + 1))
|
2020-05-28 05:42:15 +08:00
|
|
|
|
speculum=$([ $nops -le 1000 ] && echo '--speculum' || true)
|
2020-05-25 01:37:55 +08:00
|
|
|
|
while true; do
|
2020-05-26 20:11:32 +08:00
|
|
|
|
echo "======================================================================="
|
2020-06-21 00:03:10 +08:00
|
|
|
|
${BANNER} "$nops / $wbatch"
|
2020-05-25 01:37:55 +08:00
|
|
|
|
subcase=0
|
|
|
|
|
for ((bits=2**${#options[@]}; --bits >= 0; )); do
|
|
|
|
|
seed=$(($(date +%s) + RANDOM))
|
|
|
|
|
|
|
|
|
|
split=30
|
|
|
|
|
caption="Probe #$((++count)) int-key,with-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+key.integer,+data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) int-key,int-data, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+key.integer,+data.integer --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) with-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
|
|
|
|
|
split=24
|
|
|
|
|
caption="Probe #$((++count)) int-key,with-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+key.integer,+data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) int-key,int-data, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+key.integer,+data.integer --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) with-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
|
|
|
|
|
split=16
|
|
|
|
|
caption="Probe #$((++count)) int-key,w/o-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+key.integer,-data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=1111 \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) int-key,with-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+key.integer,+data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) int-key,int-data, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+key.integer,+data.integer --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) w/o-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=-data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=1111 \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) with-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
|
|
|
|
|
split=4
|
|
|
|
|
caption="Probe #$((++count)) int-key,w/o-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+key.integer,-data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=1111 \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) int-key,int-data, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=+key.integer,+data.integer --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=max \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
caption="Probe #$((++count)) w/o-dups, split=${split}, case $((++subcase)) of ${cases}" probe \
|
|
|
|
|
--pagesize=min --size-upper=${db_size_mb}M --table=-data.dups --keygen.split=${split} --keylen.min=min --keylen.max=max --datalen.min=min --datalen.max=1111 \
|
2020-09-21 05:24:22 +08:00
|
|
|
|
--nops=$nops --batch.write=$wbatch --mode=$(bits2list options $bits)${syncmodes[count%3]} \
|
2020-05-25 01:37:55 +08:00
|
|
|
|
--keygen.seed=${seed} basic
|
|
|
|
|
done # options
|
|
|
|
|
cases="${subcase}"
|
2021-01-30 06:19:32 +08:00
|
|
|
|
wbatch=$(((wbatch > 7) ? wbatch / 7 : 1))
|
2020-05-25 01:37:55 +08:00
|
|
|
|
if [ $wbatch -eq 1 -o $((nops / wbatch)) -gt 1000 ]; then break; fi
|
|
|
|
|
done # batch (write-ops per txn)
|
2020-05-23 21:21:39 +08:00
|
|
|
|
done # n-ops
|
2019-06-24 06:34:45 +08:00
|
|
|
|
|
|
|
|
|
echo "=== ALL DONE ====================== $(date)"
|