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
16dc9a65
Commit
16dc9a65
authored
Sep 18, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ff790436
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
4 deletions
+50
-4
go/neo/t/neotest
go/neo/t/neotest
+50
-4
No files found.
go/neo/t/neotest
View file @
16dc9a65
...
...
@@ -3,12 +3,17 @@
# ---- deploy NEO for tests/benchmarks at a node ----
die
()
{
echo
2>&1
"
$@
"
exit
1
}
# cmd_deploy [user@]<host>:<path> - deploy NEO & needed software for tests there
# ssh-key or password for access should be available
cmd_deploy
()
{
host
=
`
echo
$1
|sed
-e
's/:[^:]*$//'
`
# user@host
path
=
${
1
:
$((${#
host
}
+
1
))}
# path
test
-z
"
$host
"
-o
-z
"
$path
"
&&
echo
1>&2
"Usage: neotest deploy [user@]<host>:<path>"
&&
exit
1
test
-z
"
$host
"
-o
-z
"
$path
"
&&
die
"Usage: neotest deploy [user@]<host>:<path>"
echo
-e
"
\n
*** deploying to
$@
..."
scp
$0
$host
:neotest
ssh
$host
./neotest deploy-local
"
$path
"
...
...
@@ -17,7 +22,7 @@ cmd_deploy() {
# cmd_deploy_local <path> - deploy NEO & needed software for tests @path
cmd_deploy_local
()
{
path
=
$1
test
-z
"
$path
"
&&
echo
1>&2
"Usage: neotest deploy-local <path>"
&&
exit
1
test
-z
"
$path
"
&&
die
"Usage: neotest deploy-local <path>"
test
-e
$path
/deployed
&&
echo
"# already deployed"
&&
return
mkdir
-p
$path
cd
$path
...
...
@@ -79,6 +84,19 @@ deploy-local)
;;
esac
# on <url> ... - run ... on deployed url from inside dir of neotest
on
()
{
host
=
`
echo
$1
|sed
-e
's/:[^:]*$//'
`
# user@host
path
=
${
1
:
$((${#
host
}
+
1
))}
# path
test
-z
"
$host
"
-o
-z
"
$path
"
&&
die
"on
$1
: invalid URL"
ssh
$host
bash
-c
"test -e
$path
/deployed || echo 1>&2
\"
$url
not yet deployed
\"
;
cd
$path
. env.sh
cd src/lab.nexedi.com/kirr/neo/go/neo/t
$@
"
}
# ----------------------------------------
# XXX neo/go - must be `go install'ed`
...
...
@@ -419,8 +437,8 @@ bench_go() {
# command: benchmark when client and storage are on the same computer
cmd_bench_local
()
{
# XXX print it is 'bench-local'
install_trap
header
gen_data
...
...
@@ -463,6 +481,23 @@ cmd_bench_local() {
exit
}
# command: benchmark when server runs locally and client is on another node
cmd_bench_cluster
()
{
url
=
$1
test
-z
"
$url
"
&&
die
"Usage: neotest bench-cluster [user@]<host>:<path>"
# XXX print it is 'bench-cluster'
install_trap
header
gen_data
echo
-e
"
\n
*** ZEO"
Zpy
$fs1
/data.fs
on
$url
./neotest run-client zeo://
$Zbind
killall runzeo
wait
}
# ---- main driver ----
usage
()
{
...
...
@@ -475,7 +510,9 @@ Usage:
The commands are:
bench-local run benchmarks when client and server are on the same host
bench-local run benchmarks when client and server are both on the same localhost
bench-cluster run benchmarks when server is local and client is on another node
run-client run client benchmarks against separate server
deploy deploy NEO & needed software for tests to remote host
deploy-local deploy NEO & needed software for tests locally
...
...
@@ -487,6 +524,15 @@ bench-local)
cmd_bench_local
;;
bench-client
)
cmd_bench_client
;;
bench-cluster
)
cmd_bench_cluster
;;
-h
)
usage
exit
0
...
...
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