Skip to content

Commit

Permalink
don't do K-S test on only one function
Browse files Browse the repository at this point in the history
  • Loading branch information
leifwalsh committed Sep 10, 2017
1 parent e41951f commit 5db4791
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions perfume/perfume.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,23 +157,26 @@ def update(self, samples):
'y': [whisker_height]
}

ks_frame = analyze.ks_test(timings)
ks_bk_frame = analyze.ks_test(bucketed_timings)
describe_html = (timings.describe().style
.set_precision(3)
.set_caption('Descriptive Timing Statistics')
.render())
ks_html = (ks_frame.style.applymap(self._ks_style)
.set_precision(3)
.set_caption('K-S test')
.render())
ks_bk_html = (ks_bk_frame.style.applymap(self._ks_style)
.set_precision(2)
.set_caption('Bucketed K-S test')
.render())
html = describe_html + ks_html + ks_bk_html
self._describe_widget.data = html.replace(
'table', 'table style="display:inline"')
if len(self._colors) > 1:
ks_frame = analyze.ks_test(timings)
ks_bk_frame = analyze.ks_test(bucketed_timings)
ks_html = (ks_frame.style.applymap(self._ks_style)
.set_precision(3)
.set_caption('K-S test')
.render())
ks_bk_html = (ks_bk_frame.style.applymap(self._ks_style)
.set_precision(2)
.set_caption('Bucketed K-S test')
.render())
html = describe_html + ks_html + ks_bk_html
self._describe_widget.data = html.replace(
'table', 'table style="display:inline"')
else:
self._describe_widget.data = describe_html

total_bench_time = timings[self._initial_size:].sum().sum() / 1000.
elapsed = time.perf_counter() - self._start
Expand Down

0 comments on commit 5db4791

Please sign in to comment.