-
Notifications
You must be signed in to change notification settings - Fork 6
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
Benchmarking framework using ASV and Playwright #62
Conversation
This is great!
|
don't we want to change it to "main" before merging? |
Ah yes, I am set up to compile bokeh on all my dev machines. Try this:
It should fix the two issues you've seen, but there may be more. |
Yes! |
If this goes well we could avoid compiling bokeh from source by either building a dev release containing the extra code that we want, or perhaps including it in the default branch but only enabling it using an environment variable. |
hmm, the benchmarks are failing for me:
update.. apparently I can use |
It seems that debugging without using headless mode isn't much help as there are extra renders that you don't get in headless mode. I have modified the Bokeh This all works fine for me locally. If it doesn't work for @droumis then hopefully we will see an error message about multiple sessions and/or documents which we should (hopefully) be able to fix using an unique |
This now removes the console callback at the end of each benchmark run so no errors should be reported. There is a 10 millisecond wait for any part-processed console messages to be completely handled. 5 ms works on my dev system but I think 10 ms is a safer default. The I have also changed the README to recommend use of
This isn't really of concern as it is difficult to stop one of the server and browser without the other complaining that its friend isn't listening any more. It can be filtered out using the
We could do this programmatically within the benchmarks at some future date if desired. At this stage I would rather see the warnings. Subject to approval from @droumis, this is now a minimum viable demo of benchmarking and I would be happy for this to be merged as is and we can add other benchmarks in new PRs. |
Great work! I'll merge |
This PR adds a benchmarking framework using
ASV
andPlaywright
. To try this out, follow the instructions inbenchmarks/README.md
.To use ASV this github repo needs to be locally installable into a virtual environment, hence the top-level
pyproject.toml
containing thebuild-system
and dependencies. This is based on the one in thesrc/hvneuro
directory. Note that it only needs to be locally installable from source, it never requires the project to be formally released on PyPI or conda.At this stage there is just one simple benchmark that uses
bokeh
without any of theholoviz
packages, and it starts with a browser already opened displaying abokeh
plot, and the benchmark times the transfer of pre-generated test data to the browser and the rendering of the first frame. This is repeated for datasets of different sizes, and for bothcanvas
andwebgl
output backends. Note thatwebgl
is generally slower here as there is extra overhead in usingwebgl
that is included in the timings of the first rendered frame.Subsequent benchmarks will be more complicated, based on the existing workflows. There could be multiple benchmarks per workflow to measure the time taken for the first render (the latency), the speed of interaction using pan and/or zoom, and so on.
Before merging, the branches section of
asv.conf.json
will need to be changed toTimings I obtain on my M1 mac are:
and on my Linux box with a decent graphics card: