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
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
Levin Zimmermann
neoppod
Commits
5369d45c
Commit
5369d45c
authored
Mar 04, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
12722462
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
20 deletions
+48
-20
go/neo/t/benchplot
go/neo/t/benchplot
+48
-20
No files found.
go/neo/t/benchplot
View file @
5369d45c
...
...
@@ -132,8 +132,8 @@ class _pygomerger:
m = _bench_py_re.match(name)
assert m is not None
# XXX should be actually checking namev
# XXX '
py
,
go
' -> '
*
' ?
return name[:m.start(1)] + '
py
,
go
' + name[m.end(1):]
# XXX '
py
,
go
'
<
-> '
*
' ?
return name[:m.start(1)] + '
*
' + name[m.end(1):]
def mergepygo(B):
return Bmerge(B, _pygomerger())
...
...
@@ -169,7 +169,9 @@ class _prefixmerger:
assert tail == _tail, (tail, _tail)
prefixv.append(_prefix)
# XXX if set(prefixv) == set(self.prefixv) -> '
*
'
if set(prefixv) == set(self.prefixv):
prefix = '
*
'
else:
prefix = '
,
'.join(prefixv)
return '
%
s
/%
s
' % (prefix, tail)
...
...
@@ -268,7 +270,12 @@ def add_yvalueticks(ax, yv, fmt='%d'):
d
=
'^'
# shift a bit up
#d = '^_' # shift a bit up
l
=
(
r'${}%%s{%s}$'
%
fmt
)
%
(
d
,
y
)
if
isinstance
(
fmt
,
(
str
,
unicode
)):
ytext
=
fmt
%
y
else
:
ytext
=
fmt
(
y
)
l
=
r'${}%s{%s}$'
%
(
d
,
ytext
)
#l = r'${}%s{{}%s{%d}}$' % (d[0], d[1], y)
ylabv
.
append
(
l
)
...
...
@@ -291,14 +298,14 @@ _stylefor = {
}
_stylefor_re
=
[(
re
.
compile
(
_
),
sty
)
for
_
,
sty
in
[
(
'crc32/.*/1K'
,
_
(
color
=
'C5'
)),
(
'crc32/.*/4K'
,
_
(
color
=
'C5'
)),
# XXX distinguish
(
'sha1/.*/1K'
,
_
(
color
=
'C6'
)),
(
'sha1/.*/4K'
,
_
(
color
=
'C6'
)),
# XXX
(
'unzlib/.*/null-1K'
,
_
(
color
=
'C7'
)),
(
'unzlib/.*/null-4K'
,
_
(
color
=
'C7'
)),
# XXX
(
'unzlib/.*/wczdata'
,
_
(
color
=
'C7'
)),
# XXX
(
'unzlib/.*/prod1-avg'
,
_
(
color
=
'C7'
)),
# XXX
(
r'crc32/(py|\
*)/
4K'
,
_
(
color
=
'C5'
)),
(
r'crc32/go/4K'
,
_
(
color
=
'C5'
,
ls
=
'dashed'
)),
(
r'sha1/(py\
|*)/
4K'
,
_
(
color
=
'C6'
)),
(
r'sha1/go/4K'
,
_
(
color
=
'C6'
,
ls
=
'dashed'
)),
(
r'unzlib/(py|\
*)/wczd
ata'
,
_
(
color
=
'C7'
)),
(
r'unzlib/go/wczdata'
,
_
(
color
=
'C7'
,
ls
=
'dashed'
)),
(
r'unzlib/(py|\
*)/p
rod1-avg'
,
_
(
color
=
'C8'
)),
(
r'unzlib/go/prod1-avg'
,
_
(
color
=
'C8'
,
ls
=
'dashed'
)),
]]
del
_
...
...
@@ -415,22 +422,32 @@ def plotlat1(ax, S):
# plotnode1 plots latencies of base CPU/disk operations on the nodes.
def
plotnode1
(
ax
,
B
,
w
=
0.05
):
def
plotnode1
(
ax
,
B
,
w
=
0.05
,
details
=
False
):
Bu
=
B
.
byunit
()
Bn
=
Bu
[
usop
].
byname
()
# XXX µs/op hardcoded. FIXME disk/*
S
=
dict
((
_
,
Bn
[
_
].
stats
())
for
_
in
Bn
)
# {} name -> stats
print
yticks
=
set
()
for
name
in
Bn
:
yticknames
=
{}
# ytick -> []name
# order plots (and thus their order in legend) by value
namev
=
S
.
keys
()
namev
.
sort
(
key
=
lambda
_
:
S
[
_
].
avg
,
reverse
=
True
)
for
name
in
namev
:
if
_lat1_skipname
(
name
):
continue
print
name
b
=
Bn
[
name
]
s
=
b
.
stats
()
node
,
xname
=
name
.
split
(
'/'
,
1
)
yticks
.
add
(
s
.
avg
)
yticknames
.
setdefault
(
s
.
avg
,
[]).
append
(
node
)
# XXX name
c
=
1.1
lw
=
0.5
ax
.
plot
([
c
-
w
,
c
+
w
],
[
s
.
min
]
*
2
,
lw
=
lw
,
**
stylefor
(
name
))
if
details
:
lw
=
1.5
ax
.
plot
([
c
-
w
,
c
+
w
],
[
s
.
min
]
*
2
,
lw
=
lw
,
label
=
xname
,
**
stylefor
(
name
))
ax
.
plot
([
c
-
w
,
c
+
w
],
[
s
.
max
]
*
2
,
lw
=
lw
,
**
stylefor
(
name
))
ax
.
plot
([
c
]
*
2
,
[
s
.
min
,
s
.
max
],
lw
=
lw
,
**
stylefor
(
name
))
...
...
@@ -438,14 +455,25 @@ def plotnode1(ax, B, w=0.05):
ax2
=
ax
.
twinx
()
ax2
.
set_ylim
(
ax
.
get_ylim
())
ax2
.
set_yticks
([])
add_yvalueticks
(
ax2
,
yticks
,
fmt
=
'%.1f'
)
fmt
=
'%d'
if
details
:
def
fmt
(
y
):
namev
=
yticknames
[
y
]
return
r'%.1f\
%s
' % (y, '
,
'.join(namev))
add_yvalueticks(ax2, yticks, fmt=fmt)
if details:
ax.legend(loc='
upper
left
', fontsize='
x
-
small
', #markerfirst=False,
bbox_transform=ax.transAxes, bbox_to_anchor=(1.3, 1), borderaxespad=0) # XXX hack to shift right
# benchmarks not to show
_lat1_skipre_v = [re.compile(_) for _ in [
'
.
*
adler32
/
.
*
',
'
.
*
1
K
',
'
.
*
2
M
',
'
.
*/
unzlib
/
.
*
null
',
'
.
*/
prod1
-
max
',
'
.
*-
min
',
]]
...
...
@@ -608,7 +636,7 @@ def main():
ax211
.
set_xlim
(
zxmin
,
zxmax
)
ax211
.
set_xticks
([])
ax211
.
set_xticklabels
([])
plotnode1
(
ax211
,
B
,
w
=
0.007
)
plotnode1
(
ax211
,
B
,
w
=
0.007
,
details
=
True
)
...
...
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