add simple bench script

This commit is contained in:
ubuntu201711081 2020-12-08 15:20:59 +00:00
parent 4eaed57a0c
commit 68094cf699

18
bench.sh Executable file
View File

@ -0,0 +1,18 @@
#! /bin/bash
if [[ ! -d 'tmp' ]]
then
mkdir tmp
fi
cd testdata
../server 2> log.txt > outlog.txt &
server_pid=$!
sleep 1
cd ../tmp
cat ../testdata/dlist.txt|../client localhost 9091 -b -nv -q -t 8
sed -i -E 's/^[A-Za-z:, ]*([0-9]+)[A-Za-z:, ]+([0-9]+).*$/\1,\2/' ../testdata/log.txt
echo turn off server :$server_pid
kill $server_pid