-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Log figure render count and start/end #13503
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
Conversation
This should use
then Edit: I guess the risk here is that |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## branch-3.4 #13503 +/- ##
==============================================
- Coverage 92.54% 92.54% -0.01%
==============================================
Files 323 323
Lines 20493 20493
==============================================
- Hits 18966 18965 -1
- Misses 1527 1528 +1 |
To note, a lot of information can be extracted from browsers' devtools, e.g.: |
Is the format stable across browser versions? Or even browsers? Resolving this with docs updates and some possibly some helper scripts under |
Thanks for the patience. To provide more context about what we are trying to achieve: SummaryWe are developing several workflows (HoloViz and Bokeh code), each demonstrating how to build a certain type of visualization relevant to biomedical research (e.g. Bokeh's subcoordinates_zoom EEG example is inspired by one of the workflows) For each type of workflow, we need to benchmark the latency of the initial display, as well as the latency of the updated display following an interaction event (e.g. zoom), as a function of dataset size and backend (canvas, WebGL).
Importantly, we need to be able to compare the latency measurements for the same workflow, given different versions of the workflow code (comparing script version A vs B) or changes to the underlying libraries (comparing branch A vs B). Less importantly, but in the longer term, we would like to have the workflow benchmarks used as an automated test for candidate library releases (ASV style). What has been done so far?Ian created this PR's log_render_count branch to emit figure id, count, and state (start, end) to the browser console. He also set up a system with ASV and Playwright to run repeated and parameterized (data size and backend) displays and interactions from simple HoloViz/Bokeh code snippets and use the messages from the console to measure latency. PRs: |
ac7022b
to
509901d
Compare
I don't necessarily have any problem with adding this behind |
Hi @bryevdv, since the approach we've constructed utilizes ASV and Playwright to listen for these console messages on the fly and execute parameterized runs with different backends and data amounts interleaved, it would indeed unblock our progress if this PR could be merged and included in the upcoming release, as long as there's no harm in the implementation. We don't have the availability to dive into the devtools approach anytime soon and evaluate its sufficiency, but maybe in the future it might be reasonable thing to do it as a cross-validation of measurements. I think this is a pretty unique case - wanting to get the timing of the paint - so I don't anticipate that this would lead to many more trace-based measurement PRs. |
I don't mind merging this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with @mattpap's one suggested change
509901d
to
8886ac7
Compare
Thanks! The suggested change is pushed |
this can be merged now |
* Log PlotView render count * Include model id in render console messages * remove new code annotations * test logger trace * implement log level trace handling * remove extra semicolons apply suggested message * apply suggested message --------- Co-authored-by: Ian Thomas <ianthomas23@gmail.com>
* Log figure render count and start/end (#13503) * Log PlotView render count * Include model id in render console messages * remove new code annotations * test logger trace * implement log level trace handling * remove extra semicolons apply suggested message * apply suggested message --------- Co-authored-by: Ian Thomas <ianthomas23@gmail.com> * Update CoC to use reporting form (#13647) * Let client ping failure clean up session (#13655) * Let client ping failure clean up session * Fix typo * Add test * Fix codestyle issues * Ignore pandas' deprecation warning regarding pyarrow (#13657) * Ignore pandas' deprecation warning regarding pyarrow * Fix other deprecation warnings * Support pandas 1.x and 2.x/3.x simultaneously * Fix missing User Guide sidebars (#13659) * Update environment-release-build.yml * Use pip syntax * Force import line wrap by count and line length (#13626) * Make line_length cutoff consistent at 88 * Update the codebase * Use relative imports to shorten line lengths * add rst-files for glyphes (#13597) * Update app.rst (#13588) * Add Metadata for airports_graph.py and geojson_source.py (#13568) * Added metadata to airports_graph.py * Added metadata to geojson_source.py * Remove trailing whitespaces * Fix formating of metadata, remove some apis from airports_graph.py * Add space between tripple qoute and first letter * remove trailing white space * Add Iterable kind and use it in BooleanFilter.booleans (#13661) * update switcher.json and release notes * baseline test manual fixup --------- Co-authored-by: Demetris Roumis <roumis.d@gmail.com> Co-authored-by: Ian Thomas <ianthomas23@gmail.com> Co-authored-by: Pavithra Eswaramoorthy <pavithraes@outlook.com> Co-authored-by: Philipp Rudiger <prudiger@anaconda.com> Co-authored-by: Mateusz Paprocki <mattpap@gmail.com> Co-authored-by: Moritz Schreiber <68053396+mosc9575@users.noreply.github.com> Co-authored-by: Icoti <94801369+Icoti@users.noreply.github.com> Co-authored-by: dasha-moskv <81783162+dasha-moskv@users.noreply.github.com>
* Log PlotView render count * Include model id in render console messages * remove new code annotations * test logger trace * implement log level trace handling * remove extra semicolons apply suggested message * apply suggested message --------- Co-authored-by: Ian Thomas <ianthomas23@gmail.com>
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This branch, created by @ianthomas23 (and now rebased onto branch-3.4), addresses the need for a console log render count to measure the latency of display and interaction updates. It includes the figure id, count, and state (start, end).
As this is likely not ideal to have printed for every user, the next step is to limit the conditions under which it is emitted. I could use feedback/guidance on achieving this, maybe with an environment variable like 'BOKEH_RENDER_COUNT'.
[ ] tests added / passedN/A[ ] release document entry (if new feature or API change)N/AUPDATE: I've put the console messages behind Bokeh log level "trace" as suggested.