-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically render benchee results #132
Comments
We may also be able to implement |
I am starting to play around with plotting benchee results with Livebook. I'll post some screen shots here once I have the visuals up and running. @josevalim can you expand on your comment? Perhaps a silly question...but what's |
@akoutmos it's a package we published recently, see the docs. When a struct implements the |
Ahhh. It's all clear to me now :D. I added the The boxplot doesn't look the best because of the outliers, but it does plot. With the |
@akoutmos awesome!! I think we will end up with |
What if we flip the bar chart? This should make the job names horizontal and easier to read. |
That was my feeling as well pulling it in. Can you create the I'll update the visuals with your UX suggestions :). |
Thanks! |
I think I am more or less done with the implementation of everything. I'll open up the PR to benchee later tonight for table support and link it here for visibility. After that gets merged in and a new release is cut, I can require that version in End result: |
We cannot ship and a new kino version Because it requires a new livebook-version, therefore we have To wait until we release 0.7 :( I expect that to happen within a month! |
In the meantime, pointing to |
No worries at all @josevalim! I opened up PRs for everything that I have for this feature and will address things as they come up :). Sounds good @jonatanklosko. I did that and opened the draft PR in Thanks! |
I used the following config Mix.install([
{:kino, git: "https://github.com/livebook-dev/kino.git", override: true},
{:benchee, git: "https://github.com/bencheeorg/benchee.git", override: true},
{:kino_benchee, git: "https://github.com/livebook-dev/kino_benchee.git", override: true}
])
suite = Benchee.run(
%{
"solve1" => fn -> solve1.(input, 4) end,
"solve2" => fn -> solve2.(input, 4) end,
"solve3" => fn -> solve3.(input, 4) end
},
time: 1,
memory_time: 1,
)
Kino.Render.to_livebook(suite) and get the error |
Unfortunately what you posted won't work until this PR is merged in: bencheeorg/benchee#369 @jonatanklosko Should we instead provide the Table protocol implementation in this library (https://github.com/livebook-dev/kino_benchee) so we can better control the maintenance of it? If so I can move the protocol implementation and open up a PR to that lib instead. Thoughts? |
@akoutmos it will all depend if they plan to eventually merge that PR or not. :) |
To make it easier for other users it might be helpful to mark the repo as "in development" or "wait for PR" in the README. |
Sounds good to me 👍 |
👋 From a long slumber the @PragTob awakens. Sorry, lots of stress, bunny health, own health etc... and while bunny health is also... let's say medium right now... I'm looking at it now :) 💚 I want to eventually accept the PR and ship it. I'm still medium torn on including support for essentially a third party thing that is none trivial within benchee itself (vs. a separate package to provide it) - but it seems like that's what most people are doing right now and the |
HI @PragTob! Thanks for the updates and hopefully everyone will recover soon :) The goal of Table.Reader was exactly to decouple Livebook concerns from Benchee. Right now it is only used for Livebook but you can imagine we will add That said, you don't have to merge Table.Reader support into Benchee at all. The beauty of protocols is that they can be implemented anywhere and we could implement it in Kino.Benchee too. We basically wanted to touch point with you so we don't implement a protocol you would implement anyway. But given Benchee's architecture where even basic plugins such as HTML support are separate projects, I would even say that you probably shouldn't merge it. We just need your position. :) |
@josevalim muito obrigado :) Yeah that's what has been on my mind - benchee tries to be as slim of a core as possible (I event want to push this further) and do everything else in separate packages. Given the more general use case for |
And of course supported elixir versions differ which hints at making a package or fiddle with CI 😅 But... I'll leave this thread alone with this now and focus it on the MR bencheeorg/benchee#377 |
To clarify: we will need the separate package anyway. |
@josevalim you mean like |
Only Kino.Benchee, yeah. |
Btw, another benefit of Table.Reader is that Explorer supports Table.Reader inputs. So you could load data into a dataframe and start further manipulating it. |
Benchee.run
returns a%Benchee.Suite{}
struct with a ton of numbers. We can implement theKino.Render
protocol to show some plots. As for what to show, there's benchee_html to take inspiration from. Maybe alternatively we could embed the result ofbenchee_html
.The text was updated successfully, but these errors were encountered: