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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefane Fermigier
neo
Commits
fc4a7c11
Commit
fc4a7c11
authored
Mar 04, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
37d24e29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
go/neo/t/benchplot
go/neo/t/benchplot
+15
-14
No files found.
go/neo/t/benchplot
View file @
fc4a7c11
...
@@ -240,7 +240,7 @@ def Bmerge(B, merger):
...
@@ -240,7 +240,7 @@ def Bmerge(B, merger):
# add_yvalueticks adds small yticks for values in yv.
# add_yvalueticks adds small yticks for values in yv.
def add_yvalueticks(ax, yv):
def add_yvalueticks(ax, yv
, fmt='
%
d
'
):
ys0 = set(ax.get_yticks())
ys0 = set(ax.get_yticks())
ys = ys0.copy()
ys = ys0.copy()
ys.update(yv)
ys.update(yv)
...
@@ -263,7 +263,7 @@ def add_yvalueticks(ax, yv):
...
@@ -263,7 +263,7 @@ def add_yvalueticks(ax, yv):
d = '
^
' # shift a bit up
d = '
^
' # shift a bit up
#d = '
^
_
' # shift a bit up
#d = '
^
_
' # shift a bit up
l =
r'
$
{}
%
s
{
%
d
}
$
'
% (d, y)
l =
(r'
$
{}
%%
s
{
%
s
}
$
' % fmt)
% (d, y)
#l = r'
$
{}
%
s
{{}
%
s
{
%
d
}}
$
' % (d[0], d[1], y)
#l = r'
$
{}
%
s
{{}
%
s
{
%
d
}}
$
' % (d[0], d[1], y)
ylabv.append(l)
ylabv.append(l)
...
@@ -362,11 +362,8 @@ def plotseries(ax, labkey, S):
...
@@ -362,11 +362,8 @@ def plotseries(ax, labkey, S):
# plotlat1 makes plot of benchmark latencies for serial (1 client) case.
# plotlat1 makes plot of benchmark latencies for serial (1 client) case.
#
#
# it also shows latencies of base CPU/disk operations on the nodes involved.
#
# S - latency-µs/object series
# S - latency-µs/object series
# Bnode - {} node -> [] node-local basic benchmarks
def
plotlat1
(
ax
,
S
):
def
plotlat1
(
ax
,
S
,
Bnode
):
yticks0
=
set
()
yticks0
=
set
()
for
name
in
S
:
for
name
in
S
:
b
=
S
[
name
].
series
[
0
]
b
=
S
[
name
].
series
[
0
]
...
@@ -386,15 +383,12 @@ def plotlat1(ax, S, Bnode):
...
@@ -386,15 +383,12 @@ def plotlat1(ax, S, Bnode):
# mark first values with dedicated y ticks
# mark first values with dedicated y ticks
add_yvalueticks
(
ax
,
yticks0
)
add_yvalueticks
(
ax
,
yticks0
)
# --- node-local basic operations ---
_plotnode1
(
ax
,
Bnode
)
def
_plotnode1
(
ax
,
Bnode
):
# plotnode1 plots latencies of base CPU/disk operations on the nodes.
B
=
mergebynode
(
Bnode
)
def
plotnode1
(
ax
,
B
):
B
=
mergepygo
(
B
)
Bu
=
B
.
byunit
()
Bu
=
B
.
byunit
()
Bn
=
Bu
[
usop
].
byname
()
# XXX µs/op hardcoded. FIXME disk/*
Bn
=
Bu
[
usop
].
byname
()
# XXX µs/op hardcoded. FIXME disk/*
print
print
yticks
=
set
()
yticks
=
set
()
for
name
in
Bn
:
for
name
in
Bn
:
...
@@ -414,7 +408,7 @@ def _plotnode1(ax, Bnode):
...
@@ -414,7 +408,7 @@ def _plotnode1(ax, Bnode):
ax2
=
ax
.
twinx
()
ax2
=
ax
.
twinx
()
ax2
.
set_ylim
(
ax
.
get_ylim
())
ax2
.
set_ylim
(
ax
.
get_ylim
())
ax2
.
set_yticks
([])
ax2
.
set_yticks
([])
add_yvalueticks
(
ax2
,
yticks
)
add_yvalueticks
(
ax2
,
yticks
,
fmt
=
'%.1f'
)
...
@@ -559,7 +553,14 @@ def main():
...
@@ -559,7 +553,14 @@ def main():
ax2
.
add_patch
(
BboxPatch
(
rect
,
fill
=
False
,
fc
=
"none"
,
ec
=
"0.5"
,
lw
=
0.5
))
ax2
.
add_patch
(
BboxPatch
(
rect
,
fill
=
False
,
fc
=
"none"
,
ec
=
"0.5"
,
lw
=
0.5
))
ax2
.
add_patch
(
BboxConnectorPatch
(
ax21
.
bbox
,
rect
,
3
,
2
,
4
,
1
,
ec
=
"0.5"
,
lw
=
0.5
))
ax2
.
add_patch
(
BboxConnectorPatch
(
ax21
.
bbox
,
rect
,
3
,
2
,
4
,
1
,
ec
=
"0.5"
,
lw
=
0.5
))
plotlat1
(
ax21
,
Slat
,
Bnode
)
plotlat1
(
ax21
,
Slat
)
# also show sha1, unzip, ... latencies
B
=
mergebynode
(
Bnode
)
B
=
mergepygo
(
B
)
plotnode1
(
ax21
,
B
)
# and same in detail
...
...
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