Skip to content

gh-145306: Fix browser open after empty export#150017

Open
ivonastojanovic wants to merge 2 commits into
python:mainfrom
lkollar:tachyon/fix-browser-open
Open

gh-145306: Fix browser open after empty export#150017
ivonastojanovic wants to merge 2 commits into
python:mainfrom
lkollar:tachyon/fix-browser-open

Conversation

@ivonastojanovic
Copy link
Copy Markdown
Contributor

Make sampling exporters report whether output was generated, and only open HTML reports in the browser after a successful export.

Comment thread Lib/profiling/sampling/cli.py Outdated
if args.format in ('flamegraph', 'diff_flamegraph', 'heatmap') and getattr(args, 'browser', False):
if (
export_ok
and args.format in ('flamegraph', 'diff_flamegraph', 'heatmap')
Copy link
Copy Markdown
Contributor

@maurycy maurycy May 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, I think introducing BROWSER_COMPATIBLE_FORMATS makes sense here. @lkollar could you make that change?

@picnixz picnixz changed the title gh-145306 Fix browser open after empty export gh-145306: Fix browser open after empty export May 19, 2026
lkollar added 2 commits May 21, 2026 16:49
Make sampling exporters report whether output was generated, and only
open HTML reports in the browser after a successful export.
@lkollar lkollar force-pushed the tachyon/fix-browser-open branch from e98a58b to 4334b0f Compare May 21, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants