-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add plots recipes for single Trial or BenchmarkGroup of Trials Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name = "BenchmarkPlots" | ||
uuid = "ab8c0f59-4072-4e0d-8f91-a91e1495eb26" | ||
version = "0.1.0" | ||
|
||
[deps] | ||
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" | ||
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" | ||
|
||
[compat] | ||
BenchmarkTools = "1" | ||
RecipesBase = "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module BenchmarkPlots | ||
using RecipesBase | ||
using BenchmarkTools: Trial, BenchmarkGroup | ||
|
||
@recipe function f(::Type{Trial}, t::Trial) | ||
seriestype --> :violin | ||
legend --> false | ||
yguide --> "t / ns" | ||
xticks --> false | ||
t.times | ||
end | ||
|
||
@recipe function f(g::BenchmarkGroup, keys=keys(g)) | ||
legend --> false | ||
yguide --> "t / ns" | ||
for k in keys | ||
@series begin | ||
label --> string(k) | ||
xticks --> true | ||
[string(k)], g[k] | ||
end | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters