-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-142927: Auto-open HTML output in browser after generation #143178
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
base: main
Are you sure you want to change the base?
Conversation
Automatically open flamegraph and heatmap HTML output in the default browser after profiling completes. Add --no-browser flag to disable this behavior.
|
You probably need to update the test to NOT open the browser by default and make the CLI the only that sets that option to True :) |
|
Changing the issue to gh-142927 |
|
And we also need to mention something related to this behavior in the docs |
|
Some tests re opening browsers now 😆 You probably want this diff at least: diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_children.py b/Lib/test/test_profiling/test_sampling_profiler/test_children.py
index b7dc878a238..3d6db7dcb56 100644
--- a/Lib/test/test_profiling/test_sampling_profiler/test_children.py
+++ b/Lib/test/test_profiling/test_sampling_profiler/test_children.py
@@ -992,6 +992,7 @@ def test_subprocesses_flag_with_flamegraph_output(self):
"-r",
"100",
"--flamegraph",
+ "--no-browser",
"-o",
output_file,
script_file, |
|
Hey, 👋 sorry for a drive-by comment, just wanted to chime in with a specific use case: the default behaviour you're introducing here is suuuper annoying when being logged in via SSH (and based on my experience it's too easy to forget the According to (this post)[https://unix.stackexchange.com/a/9607], it might be possible (at least on best effort basis) to check some environment variables to detect the SSH connection, and perhaps disable the browser-opening automatically in that case? If that sounds reasonable I can do a bit of testing for SSH detection tomorrow. The biggest disadvantage I see that it would make the default behaviour less trivial to explaing to users... |
Automatically open flamegraph and heatmap HTML output in the default browser after profiling completes. Add
--no-browserflag to disable this behavior.Towards #142927.
CC: @pablogsal @lkollar