Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
334ba1ee
Commit
334ba1ee
authored
Sep 18, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
abc6fbf9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
go/neo/t/neotest
go/neo/t/neotest
+13
-11
No files found.
go/neo/t/neotest
View file @
334ba1ee
...
@@ -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
-i
0
-w
3
-q
$peer
ping
-i
200
-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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment