mirror of
https://github.com/teddysun/across.git
synced 2025-01-19 06:19:35 +08:00
Update comments
Fixed Latency result display Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
parent
6d3418e094
commit
9bc6ce3b98
2
bench.sh
2
bench.sh
@ -62,7 +62,7 @@ speed_test() {
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
local dl_speed=$(awk '/Download/{print $3" "$4}' ./speedtest-cli/speedtest.log)
|
local dl_speed=$(awk '/Download/{print $3" "$4}' ./speedtest-cli/speedtest.log)
|
||||||
local up_speed=$(awk '/Upload/{print $3" "$4}' ./speedtest-cli/speedtest.log)
|
local up_speed=$(awk '/Upload/{print $3" "$4}' ./speedtest-cli/speedtest.log)
|
||||||
local latency=$(awk '/Latency/{print $2" "$3}' ./speedtest-cli/speedtest.log)
|
local latency=$(awk '/Latency/{print $3" "$4}' ./speedtest-cli/speedtest.log)
|
||||||
if [[ -n "${dl_speed}" && -n "${up_speed}" && -n "${latency}" ]]; then
|
if [[ -n "${dl_speed}" && -n "${up_speed}" && -n "${latency}" ]]; then
|
||||||
printf "\033[0;33m%-18s\033[0;32m%-18s\033[0;31m%-20s\033[0;36m%-12s\033[0m\n" " ${nodeName}" "${up_speed}" "${dl_speed}" "${latency}"
|
printf "\033[0;33m%-18s\033[0;32m%-18s\033[0;31m%-20s\033[0;36m%-12s\033[0m\n" " ${nodeName}" "${up_speed}" "${dl_speed}" "${latency}"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user