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
9450b6db
Commit
9450b6db
authored
Oct 13, 2017
by
Test
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X bench-remote / ping += std bench output
parent
eb2ce7b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
go/neo/t/neotest
go/neo/t/neotest
+22
-2
No files found.
go/neo/t/neotest
View file @
9450b6db
...
@@ -20,6 +20,8 @@
...
@@ -20,6 +20,8 @@
# See COPYING file for full licensing terms.
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
# See https://www.nexedi.com/licensing for rationale and options.
set
-o
pipefail
# ---- deploy NEO for tests/benchmarks at a node ----
# ---- deploy NEO for tests/benchmarks at a node ----
die
()
{
die
()
{
...
@@ -747,6 +749,7 @@ bench_disk() {
...
@@ -747,6 +749,7 @@ bench_disk() {
# ioping2bench <topic> - converts timings from ioping to std benchmark
# ioping2bench <topic> - converts timings from ioping to std benchmark
ioping2bench
()
{
ioping2bench
()
{
# XXX normalize all units to µs (benchstat treats time and µs as different - XXX better improve benchstat)
# XXX normalize all units to µs (benchstat treats time and µs as different - XXX better improve benchstat)
# min/avg/max/mdev = 102.2 us / 138.6 us / 403.3 us / 12.2 us
sed
-u
-e
\
sed
-u
-e
\
"s|^min/avg/max/mdev =
\(
[0-9.]
\+\)
\(
[^ ]
\+\)
/
\(
[0-9.]
\+\)
\(
[^ ]
\+\)
/
\(
[0-9.]
\+\)\+
\(
[^ ]
\+\)
/
\(
[0-9.]
\+\)
\(
[^ ]
\+\)\$
|&
\n\
"s|^min/avg/max/mdev =
\(
[0-9.]
\+\)
\(
[^ ]
\+\)
/
\(
[0-9.]
\+\)
\(
[^ ]
\+\)
/
\(
[0-9.]
\+\)\+
\(
[^ ]
\+\)
/
\(
[0-9.]
\+\)
\(
[^ ]
\+\)\$
|&
\n\
Benchmark
$1
-min 1
\\
1
\\
2/op
\n\
Benchmark
$1
-min 1
\\
1
\\
2/op
\n\
...
@@ -878,6 +881,18 @@ cmd_bench-cluster() {
...
@@ -878,6 +881,18 @@ cmd_bench-cluster() {
echo
-e
"
\n
*** link latency:"
echo
-e
"
\n
*** link latency:"
peer
=
`
python
-c
"import urlparse as p; u=p.urlparse(
\"
scheme://
$url
\"
); print u.hostname"
`
peer
=
`
python
-c
"import urlparse as p; u=p.urlparse(
\"
scheme://
$url
\"
); print u.hostname"
`
# ping2bench <topic> - converts timingss from ping to std benchmark
ping2bench
()
{
# rtt min/avg/max/mdev = 0.028/0.031/0.064/0.007 ms, ipg/ewma 0.038/0.032 ms
# XXX normalize to µs
sed
-u
-e
\
"s|^rtt min/avg/max/mdev =
\(
[0-9.]
\+\)
/
\(
[0-9.]
\+\)
/
\(
[0-9.]
\+\)
/
\(
[0-9.]
\+\)
ms.*
\$
|&
\n\
Benchmark
$1
-min 1
\\
1 ms/op
\n\
Benchmark
$1
-avg 1
\\
2 ms/op
\
|"
}
# 16 = minimum ping payload size at which it starts putting struct timeval into payload and print RTT
# 16 = minimum ping payload size at which it starts putting struct timeval into payload and print RTT
# 1472 = 1500 (Ethernet MTU) - 20 (IPv4 header !options) - 8 (ICMPv4 header)
# 1472 = 1500 (Ethernet MTU) - 20 (IPv4 header !options) - 8 (ICMPv4 header)
# 1452 = 1500 (Ethernet MTU) - 40 (IPv6 header !options) - 8 (ICMPv6 header)
# 1452 = 1500 (Ethernet MTU) - 40 (IPv6 header !options) - 8 (ICMPv6 header)
...
@@ -885,10 +900,15 @@ cmd_bench-cluster() {
...
@@ -885,10 +900,15 @@ cmd_bench-cluster() {
sizev
=
"16 1452"
# max = min(IPv4, IPv6) so that it is always only 1 Ethernet frame on the wire
sizev
=
"16 1452"
# max = min(IPv4, IPv6) so that it is always only 1 Ethernet frame on the wire
for
size
in
$sizev
;
do
for
size
in
$sizev
;
do
echo
-e
"
\n
#
`
hostname
`
⇄
$peer
(ping
${
size
}
B)"
echo
-e
"
\n
#
`
hostname
`
⇄
$peer
(ping
${
size
}
B)"
$profile
sudo
-n
ping
-i0
-w
3
-s
$size
-q
$peer
||
echo
"# skipped -> enable ping in sudo for
`
whoami
`
@
`
hostname
`
"
{
$profile
sudo
-n
ping
-i0
-w
3
-s
$size
-q
$peer
||
\
echo
"# skipped -> enable ping in sudo for
`
whoami
`
@
`
hostname
`
"
;
}
|
\
ping2bench
`
hostname
`
-
$peer
/ping/
${
size
}
B
echo
-e
"
\n
#
$peer
⇄
`
hostname
`
(ping
${
size
}
B)"
echo
-e
"
\n
#
$peer
⇄
`
hostname
`
(ping
${
size
}
B)"
# TODO profile remotely
# TODO profile remotely
on
$url
"sudo -n ping -i0 -w3 -s
${
size
}
-q
\$
(echo
\$
{SSH_CONNECTION%% *}) || echo
\\\"
# skipped -> enable ping in sudo for
\`
whoami
\`
@
\`
hostname
\`\\\"
"
on
$url
"sudo -n ping -i0 -w3 -s
${
size
}
-q
\$
(echo
\$
{SSH_CONNECTION%% *}) ||
\
echo
\\\"
# skipped -> enable ping in sudo for
\`
whoami
\`
@
\`
hostname
\`\\\"
"
|
\
ping2bench
$peer
-
`
hostname
`
/ping/
${
size
}
B
done
done
# TODO
# TODO
...
...
Kirill Smelkov
@kirr
mentioned in commit
26006d7e
·
Jul 12, 2018
mentioned in commit
26006d7e
mentioned in commit 26006d7ece004407f1f255316b5ac355cf3473fb
Toggle commit list
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