mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-28 18:48:48 +08:00
mdbx-testing: добавление tmux-battery
.
This commit is contained in:
parent
a2753c9ae1
commit
74ff4dba0a
38
test/battery-tmux.sh
Executable file
38
test/battery-tmux.sh
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Леонид Юрьев aka Leonid Yuriev <leo@yuriev.ru>
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
TEST="./test/long_stochastic.sh --skip-make"
|
||||||
|
PREFIX="/dev/shm/mdbxtest-"
|
||||||
|
|
||||||
|
tmux kill-session -t mdbx
|
||||||
|
rm -rf ${PREFIX}*
|
||||||
|
# git clean -x -f -d && make test-assertions
|
||||||
|
tmux -f ./test/tmux.conf new-session -d -s mdbx htop
|
||||||
|
|
||||||
|
W=0
|
||||||
|
for ps in min 4k max; do
|
||||||
|
for from in 1 30000; do
|
||||||
|
for n in 0 1 2 3 4 5 6 7; do
|
||||||
|
CMD="${TEST} --delay $((n * 7)) --page-size ${ps} --from ${from} --dir ${PREFIX}page-${ps}.from-${from}.${n}"
|
||||||
|
if [ $n -eq 0 ]; then
|
||||||
|
tmux new-window -t mdbx:$((++W)) -n "page-${ps}.from-${from}" -k -d "$CMD"
|
||||||
|
tmux select-layout -E tiled
|
||||||
|
else
|
||||||
|
tmux split-window -t mdbx:$W -l 20% -d $CMD
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for n in 0 1 2 3 4 5 6 7; do
|
||||||
|
CMD="${TEST} --delay $((3 + n * 7)) --page-size ${ps} --from ${from} --dir ${PREFIX}page-${ps}.from-${from}.${n}-extra"
|
||||||
|
if [ $n -eq 0 ]; then
|
||||||
|
tmux new-window -t mdbx:$((++W)) -n "page-${ps}.from-${from}-extra" -k -d "$CMD"
|
||||||
|
tmux select-layout -E tiled
|
||||||
|
else
|
||||||
|
tmux split-window -t mdbx:$W -l 20% -d $CMD
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
tmux attach -t mdbx
|
@ -17,6 +17,7 @@ PAGESIZE=min
|
|||||||
DONT_CHECK_RAM=no
|
DONT_CHECK_RAM=no
|
||||||
EXTRA=no
|
EXTRA=no
|
||||||
TAILLOG=0
|
TAILLOG=0
|
||||||
|
DELAY=0
|
||||||
|
|
||||||
while [ -n "$1" ]
|
while [ -n "$1" ]
|
||||||
do
|
do
|
||||||
@ -40,6 +41,7 @@ do
|
|||||||
echo "--dont-check-ram-size Don't check available RAM"
|
echo "--dont-check-ram-size Don't check available RAM"
|
||||||
echo "--extra Iterate extra modes/flags"
|
echo "--extra Iterate extra modes/flags"
|
||||||
echo "--taillog Dump tail of test log on failure"
|
echo "--taillog Dump tail of test log on failure"
|
||||||
|
echo "--delay NN Delay NN seconds before run test"
|
||||||
echo "--help Print this usage help and exit"
|
echo "--help Print this usage help and exit"
|
||||||
exit -2
|
exit -2
|
||||||
;;
|
;;
|
||||||
@ -158,6 +160,10 @@ do
|
|||||||
--extra)
|
--extra)
|
||||||
EXTRA=yes
|
EXTRA=yes
|
||||||
;;
|
;;
|
||||||
|
--delay)
|
||||||
|
DELAY=$(($2))
|
||||||
|
shift
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown option '$1'"
|
echo "Unknown option '$1'"
|
||||||
exit -2
|
exit -2
|
||||||
@ -437,6 +443,10 @@ function probe {
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ "$DELAY" != "0" ]; then
|
||||||
|
sleep $DELAY
|
||||||
|
fi
|
||||||
|
|
||||||
count=0
|
count=0
|
||||||
loop=0
|
loop=0
|
||||||
cases='?'
|
cases='?'
|
||||||
|
3
test/tmux.conf
Normal file
3
test/tmux.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
setw -g aggressive-resize on
|
||||||
|
set-option -g remain-on-exit on
|
||||||
|
# set-option -g remain-on-exit-format FAILED
|
Loading…
x
Reference in New Issue
Block a user