Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
e789dee8
Commit
e789dee8
authored
Sep 28, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a1b91494
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
35 deletions
+41
-35
go/neo/t/neotest
go/neo/t/neotest
+41
-35
No files found.
go/neo/t/neotest
View file @
e789dee8
...
@@ -47,10 +47,20 @@ GOPATH=${GOPATH%:}
...
@@ -47,10 +47,20 @@ GOPATH=${GOPATH%:}
# lmbench
# lmbench
export PATH=
$X
/lmbench/lmbench3/bin/`cd
$X
/lmbench/lmbench3/src; ../scripts/os`:
$PATH
export PATH=
$X
/lmbench/lmbench3/bin/`cd
$X
/lmbench/lmbench3/src; ../scripts/os`:
$PATH
# ioping
export PATH=
$X
/ioping:
$PATH
# XXX for mysqld
# XXX for mysqld
export PATH=
$PATH
:/usr/sbin
export PATH=
$PATH
:/usr/sbin
EOF
EOF
# NOTE lmbench before env.sh becuase env.sh uses `scripts/os` from lmbench
git clone
-o
kirr
-b
x/kirr https://lab.nexedi.com/kirr/lmbench.git
pushd
lmbench/lmbench3/src
make
-j
`
nproc
`
go build
-o
../bin/
`
../scripts/os
`
/lat_tcp_go lat_tcp.go
popd
.
env.sh
.
env.sh
pip
install
git+https://lab.nexedi.com/nexedi/wendelin.core.git@master
# XXX does not show git in ver
pip
install
git+https://lab.nexedi.com/nexedi/wendelin.core.git@master
# XXX does not show git in ver
...
@@ -71,10 +81,9 @@ EOF
...
@@ -71,10 +81,9 @@ EOF
go get
-v
lab.nexedi.com/kirr/neo/go/...
go get
-v
lab.nexedi.com/kirr/neo/go/...
go get
-v
github.com/pkg/profile
# used by zhash.go
go get
-v
github.com/pkg/profile
# used by zhash.go
git clone
https://lab.nexedi.com/kirr/lmbench
.git
git clone
-o
kirr
-b
x/hist https://lab.nexedi.com/kirr/ioping
.git
pushd
lmbench/lmbench3/src
pushd
ioping
make
-j
`
nproc
`
make
-j
`
nproc
`
go build
-o
../bin/
`
../scripts/os
`
/lat_tcp_go lat_tcp.go
popd
popd
echo
ok
>
deployed
echo
ok
>
deployed
...
@@ -114,22 +123,20 @@ $@
...
@@ -114,22 +123,20 @@ $@
# ----------------------------------------
# ----------------------------------------
# XXX neo/go - must be `go install'ed`
# XXX use `go run ...` so it does not need go install?
# XXX neo/py, wendelin.core, ... - must be pip install'ed
# XXX neo/py, wendelin.core, ... - must be pip install'ed
# XXX neo/py: run via relative path to neomaster? (../../neo/neomaster) so we do not need to `pip install -e` ?
# XXX neo/py: run via relative path to neomaster? (../../neo/neomaster) so we do not need to `pip install -e` ?
# local
IPv6 address
# local
external address IPv4 or IPv6
myaddr
6
=
$(
getent hosts
`
hostname
`
|grep
-v
127.0 |awk
'{print $1}'
)
myaddr
=
$(
getent hosts
`
hostname
`
|grep
-v
127.0 |awk
'{print $1}'
)
# port allocations
# port allocations
([] works for IPv4 too)
Abind
=[
$myaddr
6
]
:5551
# NEO admin
Abind
=[
$myaddr
]
:5551
# NEO admin
Mbind
=[
$myaddr
6
]
:5552
# NEO master
Mbind
=[
$myaddr
]
:5552
# NEO master
Zbind
=[
$myaddr
6
]
:5553
# ZEO
Zbind
=[
$myaddr
]
:5553
# ZEO
# NEO storage. bind not strictly needed but we make sure no 2 storages are
# NEO storage. bind not strictly needed but we make sure no 2 storages are
# started at the same time
# started at the same time
Sbind
=[
$myaddr
6
]
:5554
Sbind
=[
$myaddr
]
:5554
# disk allocation
# disk allocation
log
=
`
pwd
`
/log
;
mkdir
-p
$log
log
=
`
pwd
`
/log
;
mkdir
-p
$log
...
@@ -380,11 +387,12 @@ pyver() {
...
@@ -380,11 +387,12 @@ pyver() {
# show data/versions
# show data/versions
header
()
{
header
()
{
echo
-n
"# "
;
date
--rfc-2822
echo
-n
"# "
;
date
--rfc-2822
echo
"#
`
whoami
`
@
`
hostname
--fqdn
`
(
$myaddr
6
)"
;
echo
"#
`
whoami
`
@
`
hostname
--fqdn
`
(
$myaddr
)"
;
echo
-n
"# "
;
grep
"^model name"
/proc/cpuinfo |head
-1
|sed
-e
's/model name\s*: //'
echo
-n
"# "
;
grep
"^model name"
/proc/cpuinfo |head
-1
|sed
-e
's/model name\s*: //'
echo
-n
"# "
;
uname
-a
echo
-n
"# "
;
uname
-a
echo
-n
"# "
;
python
--version
echo
-n
"# "
;
python
--version
echo
-n
"# "
;
go version
echo
-n
"# "
;
go version
echo
-n
"# "
;
python
-c
'import sqlite3 as s; print "sqlite %s (py mod %s)" % (s.sqlite_version, s.version)'
echo
-n
"# "
;
mysqld
--version
echo
-n
"# "
;
mysqld
--version
pyver neoppod neo
pyver neoppod neo
...
@@ -394,10 +402,6 @@ header() {
...
@@ -394,10 +402,6 @@ header() {
pyver wendelin.core
pyver wendelin.core
}
}
# build go client
# (we run it several times and in parallel - for go build not to infere with benchmarking)
go build
-o
zhash_go zhash.go
# run benchmarks
# run benchmarks
Nrun
=
4
# repeat benchmarks N time
Nrun
=
4
# repeat benchmarks N time
Npar
=
8
# run so many parallel clients in parallel phase
Npar
=
8
# run so many parallel clients in parallel phase
...
@@ -453,7 +457,7 @@ bench_go() {
...
@@ -453,7 +457,7 @@ bench_go() {
# command: benchmark when client and storage are on the same computer
# command: benchmark when client and storage are on the same computer
cmd_bench
_
local
()
{
cmd_bench
-
local
()
{
echo
-e
">>> bench-local"
echo
-e
">>> bench-local"
header
header
install_trap
install_trap
...
@@ -499,7 +503,7 @@ cmd_bench_local() {
...
@@ -499,7 +503,7 @@ cmd_bench_local() {
}
}
# command: benchmark when server runs locally and client is on another node
# command: benchmark when server runs locally and client is on another node
cmd_bench
_
cluster
()
{
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>"
...
@@ -585,7 +589,7 @@ cmd_bench_cluster() {
...
@@ -585,7 +589,7 @@ cmd_bench_cluster() {
}
}
# command: run client workload against sepearate server
# command: run client workload against sepearate server
cmd_run
_
client
()
{
cmd_run
-
client
()
{
goonly
=
""
goonly
=
""
case
"
$1
"
in
case
"
$1
"
in
--goonly
)
--goonly
)
...
@@ -601,14 +605,14 @@ cmd_run_client() {
...
@@ -601,14 +605,14 @@ cmd_run_client() {
}
}
# command: print information about local node
# command: print information about local node
cmd_info
_
local
()
{
cmd_info
-
local
()
{
header
header
}
}
# ---- main driver ----
# ---- main driver ----
usage
()
{
usage
()
{
cat
1>&2
<<
'
EOF
'
cat
1>&2
<<
EOF
Neotest is a tool to functionally test and benchmark NEO.
Neotest is a tool to functionally test and benchmark NEO.
Usage:
Usage:
...
@@ -630,24 +634,16 @@ EOF
...
@@ -630,24 +634,16 @@ EOF
}
}
case
"
$1
"
in
case
"
$1
"
in
bench-local
)
# commands that require build
shift
bench-local
|
\
cmd_bench_local
"
$@
"
run-client
|
\
;;
run-client
)
shift
cmd_run_client
"
$@
"
;;
bench-cluster
)
bench-cluster
)
shift
cmd_bench_cluster
"
$@
"
;;
;;
info-local
)
info-local
)
shift
shift
cmd_info_local
"
$@
"
cmd_info-local
"
$@
"
exit
0
;;
;;
-h
)
-h
)
...
@@ -659,3 +655,13 @@ info-local)
...
@@ -659,3 +655,13 @@ info-local)
exit
1
exit
1
;;
;;
esac
esac
# rebuild go bits
go
install
-v
lab.nexedi.com/kirr/neo/go/...
go build
-o
zhash_go zhash.go
# run the command
cmd
=
"
$1
"
shift
cmd_
$cmd
"
$@
"
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