Commit 334ba1ee authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent abc6fbf9
...@@ -86,6 +86,7 @@ esac ...@@ -86,6 +86,7 @@ esac
# on <url> ... - run ... on deployed url from inside dir of neotest # on <url> ... - run ... on deployed url from inside dir of neotest
on() { on() {
#echo "on $@"
host=`echo $1 |sed -e 's/:[^:]*$//'` # user@host host=`echo $1 |sed -e 's/:[^:]*$//'` # user@host
path=${1:$((${#host} + 1))} # path path=${1:$((${#host} + 1))} # path
test -z "$host" -o -z "$path" && die "on $1: invalid URL" test -z "$host" -o -z "$path" && die "on $1: invalid URL"
...@@ -93,6 +94,7 @@ on() { ...@@ -93,6 +94,7 @@ on() {
ssh $host "bash -c \"test -e $path/deployed || { echo 1>&2 '$url not yet deployed'; exit 1; } ssh $host "bash -c \"test -e $path/deployed || { echo 1>&2 '$url not yet deployed'; exit 1; }
cd $path cd $path
. env.sh . env.sh
#set -x
cd src/lab.nexedi.com/kirr/neo/go/neo/t cd src/lab.nexedi.com/kirr/neo/go/neo/t
$@ $@
\"" \""
...@@ -488,19 +490,19 @@ cmd_bench_cluster() { ...@@ -488,19 +490,19 @@ cmd_bench_cluster() {
url=$1 url=$1
test -z "$url" && die "Usage: neotest bench-cluster [user@]<host>:<path>" test -z "$url" && die "Usage: neotest bench-cluster [user@]<host>:<path>"
echo -e ">>> bench-cluster $url" #echo -e ">>> bench-cluster $url"
echo -e "\n# server:" #echo -e "\n# server:"
header #header
echo -e "\n# client:" #echo -e "\n# client:"
on $url ./neotest info-local #on $url ./neotest info-local
echo -e "\n# link latency:" echo -e "\n# link latency:"
peer=`python -c 'import urlparse as p; u=p.urlparse("$url"); print u.hostname'` peer=`python -c "import urlparse as p; u=p.urlparse(\"scheme://$url\"); print u.hostname"`
echo "# .$peer" echo "# `hostname`$peer"
ping -i0 -w 3 -q $peer ping -i200 -w 3 -q $peer # XXX 200 -> 0
echo "# $peer." echo "# $peer`hostname`"
# neotest pts/3 2017-09-18 17:31 2401:5180:0:37::1 on $url "ping -i200 -w3 -q \$(echo \${SSH_CONNECTION%% *})" # XXX 200 -> 0
on $url 'ping -i0 -w3 -q who -m --ips | awk \'{print $5}\'' return
echo echo
install_trap install_trap
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment