{\rtf1\ansi\ansicpg1252\cocoartf2580
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;}
{\colortbl;\red255\green255\blue255;\red202\green202\blue202;\red23\green23\blue23;}
{\*\expandedcolortbl;;\cssrgb\c83137\c83137\c83137;\cssrgb\c11765\c11765\c11765;}
\paperw11900\paperh16840\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\deftab720
\pard\pardeftab720\sl360\partightenfactor0

\f0\fs24 \cf2 \cb3 \expnd0\expndtw0\kerning0
cleanup() \{\
	status=$?\
	cd ../../..\
	rm -f `ls -t jenkins*.tgz | sed '1,5d'`\
	tar czf $BUILD_TAG.tgz build_posix\
\}\
\
pwd\
rundir=bench/workgen/runner\
cd $rundir || cleanup\
\
sync ; sleep 10\
\
test=many-dhandle-stress.py\
output=output.log\
echo "python3 $test 2> $output"\
python3 $test 2> $output\
cat $output\
\
# Retrieve the number of too long CREATE/DROP, as well as read/insert/update operations\
warning_idle=$(grep -ic "cycling idle" $output)\
warning_operations=$(grep -ic "max latency exceeded" $output)\
value_create=$(grep -ic "cycling idle.*create" $output)\
value_drop=$(grep -ic "cycling idle.*drop" $output)\
value_read=$(grep -ic "max latency exceeded.*read" $output)\
value_insert=$(grep -ic "max latency exceeded.*insert" $output)\
value_update=$(grep -ic "max latency exceeded.*update" $output)\
# Save\
echo "YVALUE=$warning_operations" > warning_operations.properties\
\
# Retrieve and save the 5 longest latencies\
value_drop_diff_5=($(grep -i "cycling idle.*drop" $output | awk '\{print $23\}' | sort -n | tail -5))\
value_drop_5=($(grep -i "cycling idle.*drop" $output | awk '\{print $9\}' | sort -n | tail -5))\
for ((i = 0; i < $\{#value_drop_5[@]\}; ++i)); do\
    echo "YVALUE=$\{value_drop_5[$i]\}" > latency_drop_max"$i".properties\
done\
\
value_create_5=($(grep -i "cycling idle.*create" $output | awk '\{print $9\}' | sort -n | tail -5))\
for ((i = 0; i < $\{#value_create_5[@]\}; ++i)); do\
	echo "YVALUE=$\{value_create_5[$i]\}" > latency_create_max"$i".properties\
done\
\
value_read_5=($(grep -i "max latency exceeded.*read" $output | awk '\{print $12\}' | sort -n | tail -5))\
for ((i = 0; i < $\{#value_read_5[@]\}; ++i)); do\
	echo "YVALUE=$\{value_read_5[$i]\}" > latency_read_max"$i".properties\
done\
\
value_insert_5=($(grep -i "max latency exceeded.*insert" $output | awk '\{print $12\}' | sort -n | tail -5))\
for ((i = 0; i < $\{#value_insert_5[@]\}; ++i)); do\
	echo "YVALUE=$\{value_insert_5[$i]\}" > latency_insert_max"$i".properties\
done\
\
value_update_5=($(grep -i "max latency exceeded.*update" $output | awk '\{print $12\}' | sort -n | tail -5))\
for ((i = 0; i < $\{#value_update_5[@]\}; ++i)); do\
	echo "YVALUE=$\{value_update_5[$i]\}" > latency_update_max"$i".properties\
done}