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
Show 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,
...
@@ -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
from
scipy.stats
import
ttest_ind_from_stats
usop
=
Unit
(
u'µs/op'
)
# BenchSeries represents several runs of a benchmark with different "·<n>".
# BenchSeries represents several runs of a benchmark with different "·<n>".
#
#
...
@@ -191,7 +193,6 @@ class merger:
...
@@ -191,7 +193,6 @@ class merger:
def Bmerge(B, merger):
def Bmerge(B, merger):
Bmerge = Benchmark()
Bmerge = Benchmark()
Bname = B.byname()
Bname = B.byname()
usop = Unit(u'
µ
s
/
op
')
for name in Bname.keys():
for name in Bname.keys():
bv = Bname.get(name)
bv = Bname.get(name)
if bv is None:
if bv is None:
...
@@ -385,59 +386,41 @@ def plotlat1(ax, S, Bnode):
...
@@ -385,59 +386,41 @@ 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 ---
# --- node-local basic operations ---
_plotnode1
(
ax
,
Bnode
)
def
_plotnode1
(
ax
,
Bnode
):
B
=
mergebynode
(
Bnode
)
B
=
mergebynode
(
Bnode
)
B
=
mergepygo
(
B
)
B
=
mergepygo
(
B
)
Bu
=
B
.
byunit
()
"""
Bn
=
Bu
[
usop
].
byname
()
# XXX µs/op hardcoded. FIXME disk/*
# {} node {} name -> Stats
print
Bnodename = OrderedDict()
yticks
=
set
()
for node in Bnode:
for
name
in
Bn
:
Sname = OrderedDict() # {} name -> Stats
Bname = Bnode[node].byname()
for name in Bname:
if
_lat1_skipname
(
name
):
if
_lat1_skipname
(
name
):
continue
continue
Sname[name] = Bname[name].stats()
print
name
b
=
Bn
[
name
]
# try merge <bench>/py with <bench>/go
s
=
b
.
stats
()
Smerge = OrderedDict() # {} name -> Stats
yticks
.
add
(
s
.
avg
)
for name in Sname.keys():
c
,
w
=
1.1
,
0.05
s = Sname.get(name)
lw
=
0.5
if s is None:
ax
.
plot
([
c
-
w
,
c
+
w
],
[
s
.
min
]
*
2
,
lw
=
lw
)
# XXX **stylefor[name]
continue # was merged/deleted
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]
# ex: unzlib/py/null-1K
# ex: disk/randread/direct/4K-avg
# mark node-local values with ticks at right
namev = name.split('/')
ax2
=
ax
.
twinx
()
if len(namev) >= 2 and namev[1] in ('py', 'go'):
ax2
.
set_ylim
(
ax
.
get_ylim
())
namev_ = namev[:] # copy
ax2
.
set_yticks
([])
namev_[1] = pygoswap[namev_[1]]
add_yvalueticks
(
ax2
,
yticks
)
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
"""
# benchmarks not to show
# benchmarks not to show
_lat1_skipre_v
=
[
re
.
compile
(
_
)
for
_
in
[
_lat1_skipre_v
=
[
re
.
compile
(
_
)
for
_
in
[
'adler32/.*'
,
'
.*
adler32/.*'
,
'.*2M'
,
'.*2M'
,
'.*/prod1-max'
,
'.*/prod1-max'
,
'.*-min'
,
'.*-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