From cf40a3a63819266051b790834af4bacb2f630b4d Mon Sep 17 00:00:00 2001 From: zqysara Date: Tue, 7 Aug 2018 14:29:27 +0800 Subject: Feat: adding a test script Adding a script to test send/recv app,and modify the introduction file Change-Id: I07f9e9eb7fb86c6ca1354542f5adc9bf758b5ab7 Signed-off-by: zqysara --- scripts/perf_test.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/perf_test.sh (limited to 'scripts') diff --git a/scripts/perf_test.sh b/scripts/perf_test.sh new file mode 100755 index 0000000..e3646bc --- /dev/null +++ b/scripts/perf_test.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +exec=$1 +shift + +while getopts ":d:s:h" arg; do + case $arg in + d) # destination ip addr + dest=${OPTARG} + ;; + s) # source ip addr + src=${OPTARG} + ;; + h) # help + echo '-d destination ip address' + echo '-s source ip address' + exit 0 + ;; + esac +done + +dir=`dirname $0` + +${dir}/../release/bin/${exec} -p 20000 -d ${dest} -a 10000 -s ${src} -l 200 -t 5000000 -i 0 -f 1 -r 20000 -n 1 -w 10 -u 10000 -e 10 -x 1 -- cgit 1.2.3-korg