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
37d24e29
Commit
37d24e29
authored
Mar 04, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5e042262
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
46 deletions
+29
-46
go/neo/t/benchplot
go/neo/t/benchplot
+29
-46
No files found.
go/neo/t/benchplot
View file @
37d24e29
...
...
@@ -31,6 +31,8 @@ from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_axes, mark_inset,
from
scipy.stats
import
ttest_ind_from_stats
usop
=
Unit
(
u'µs/op'
)
# BenchSeries represents several runs of a benchmark with different "·<n>".
#
...
...
@@ -191,7 +193,6 @@ class merger:
def Bmerge(B, merger):
Bmerge = Benchmark()
Bname = B.byname()
usop = Unit(u'
µ
s
/
op
')
for name in Bname.keys():
bv = Bname.get(name)
if bv is None:
...
...
@@ -385,59 +386,41 @@ def plotlat1(ax, S, Bnode):
# mark first values with dedicated y ticks
add_yvalueticks
(
ax
,
yticks0
)
# --- node-local basic operations ---
B
=
mergebynode
(
Bnode
)
B
=
mergepygo
(
B
)
_plotnode1
(
ax
,
Bnode
)
"""
# {} node {} name -> Stats
Bnodename = OrderedDict()
for node in Bnode:
Sname = OrderedDict() # {} name -> Stats
Bname = Bnode[node].byname()
for name in Bname:
if _lat1_skipname(name):
continue
Sname[name] = Bname[name].stats()
# try merge <bench>/py with <bench>/go
Smerge = OrderedDict() # {} name -> Stats
for name in Sname.keys():
s = Sname.get(name)
if s is None:
continue # was merged/deleted
# ex: unzlib/py/null-1K
# ex: disk/randread/direct/4K-avg
namev = name.split('/')
if len(namev) >= 2 and namev[1] in ('py', 'go'):
namev_ = namev[:] # copy
namev_[1] = pygoswap[namev_[1]]
name_ = '/'.join(namev_)
s_ = Sname[name_]
# ok to merge if either probably same or the difference is < 1µs
_ = ttest_ind_from_stats(s.avg, s.std, s.ninliers, s_.avg, s_.std, s_.ninliers)
if _.pvalue >= 0.3 or abs(s.avg - s_.avg) < 1.0:
print 'merging %s (%s)
\
t
+ %s (%s) (%s)' % (name, s, name_, s_, _)
del Sname[name]
del Sname[name_]
bmerge = Benchmark(Bname[name] + Bname[name_])
s = bmerge.stats()
namev[1] = '*'
name = '/'.join(namev)
Smerge[name] = s
"""
def
_plotnode1
(
ax
,
Bnode
):
B
=
mergebynode
(
Bnode
)
B
=
mergepygo
(
B
)
Bu
=
B
.
byunit
()
Bn
=
Bu
[
usop
].
byname
()
# XXX µs/op hardcoded. FIXME disk/*
print
yticks
=
set
()
for
name
in
Bn
:
if
_lat1_skipname
(
name
):
continue
print
name
b
=
Bn
[
name
]
s
=
b
.
stats
()
yticks
.
add
(
s
.
avg
)
c
,
w
=
1.1
,
0.05
lw
=
0.5
ax
.
plot
([
c
-
w
,
c
+
w
],
[
s
.
min
]
*
2
,
lw
=
lw
)
# XXX **stylefor[name]
ax
.
plot
([
c
-
w
,
c
+
w
],
[
s
.
max
]
*
2
,
lw
=
lw
)
# XXX **stylefor[name]
ax
.
plot
([
c
]
*
2
,
[
s
.
min
,
s
.
max
],
lw
=
lw
)
# XXX **stylefor[name]
# mark node-local values with ticks at right
ax2
=
ax
.
twinx
()
ax2
.
set_ylim
(
ax
.
get_ylim
())
ax2
.
set_yticks
([])
add_yvalueticks
(
ax2
,
yticks
)
# benchmarks not to show
_lat1_skipre_v
=
[
re
.
compile
(
_
)
for
_
in
[
'adler32/.*'
,
'
.*
adler32/.*'
,
'.*2M'
,
'.*/prod1-max'
,
'.*-min'
,
...
...
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