-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathbench-echo.sh
More file actions
executable file
·38 lines (31 loc) · 834 Bytes
/
bench-echo.sh
File metadata and controls
executable file
·38 lines (31 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
echo ""
echo "--- BENCH ECHO START ---"
echo ""
#cd $(dirname "${BASH_SOURCE[0]}")
#function cleanup {
# echo "--- BENCH ECHO DONE ---"
# kill -9 $(jobs -rp)
# wait $(jobs -rp) 2>/dev/null
#}
#trap cleanup EXIT
#mkdir -p bin
#$(pkill -9 net-echo-server || printf "")
#$(pkill -9 evio-echo-server || printf "")
function gobench {
echo "--- $1 ---"
#if [ "$3" != "" ]; then
# go build -o $2 $3
#fi
#GOMAXPROCS=1 $2 --port $4 &
$2 server localhost $3 > out.txt &
sleep 1
echo "*** 50 connections, 10 seconds, 6 byte packets"
nl=$'\r\n'
tcpkali --workers 1 -c 50 -T 10s -m "PING{$nl}" 127.0.0.1:$3
echo "--- DONE ---"
echo ""
}
gobench "benchmark" ./test/bin/benchmark 8888
#gobench "EVIO" bin/evio-echo-server ../examples/echo-server/main.go 5002