cpython/Lib/test/test_profiling/test_sampling_profiler
László Kiss Kollár 9587726a3e
gh-149430: Fix edge-cases in profiling.sampling outputs (#149431)
The line highlights on the heatmap are driven by the URL hash and the
`:target` selector. When clicking a caller/callee link for the line that
was already selected, the hash doesn't change, so the browser keeps the
existing target state and doesn't restart the animation. Due to this the
highlight only works the first time.

With this fix, line navigation goes through JavaScript. If the target
URL already points to the current location, the highlight is replayed by
clearing the animation, forcing style recalculation, and restoring it.

The `baseline_self` variable isn't initialized for structural elided
roots. This variable is accessed later unconditionally and leads to a
crash.

The child process ends up being invoked with `--diff_flamegraph` instead
of the correct argument.
2026-05-09 14:05:46 +01:00
..
__init__.py
_live_collector_helpers.py gh-138122: Make the tachyon profiler opcode-aware (#142394) 2025-12-11 03:41:47 +00:00
helpers.py gh-146256: Add --jsonl collector to the profiling.sampling (#146257) 2026-05-05 00:44:37 +00:00
mocks.py gh-138122: Add differential flame graph (#145785) 2026-03-30 12:31:06 +01:00
test_advanced.py gh-138122: Move local imports to module level in sampling profiler (#143257) 2026-01-02 02:31:39 +00:00
test_async.py gh-138122: Move local imports to module level in sampling profiler (#143257) 2026-01-02 02:31:39 +00:00
test_binary_format.py gh-149474: use Py_fopen in Binary{Reader,Writer} for audit hook and path-like support (#149524) 2026-05-09 01:01:35 +01:00
test_blocking.py gh-138122: Add blocking mode for accurate stack traces in Tachyon (#142998) 2025-12-23 10:49:47 +00:00
test_children.py gh-149430: Fix edge-cases in profiling.sampling outputs (#149431) 2026-05-09 14:05:46 +01:00
test_cli.py gh-146256: Add --jsonl collector to the profiling.sampling (#146257) 2026-05-05 00:44:37 +00:00
test_collectors.py gh-149430: Fix edge-cases in profiling.sampling outputs (#149431) 2026-05-09 14:05:46 +01:00
test_dump.py gh-149296: Add dump subcommand to sampling profiler for one-shot stack snapshots (#149297) 2026-05-04 01:02:33 +01:00
test_integration.py gh-138122: Move local imports to module level in sampling profiler (#143257) 2026-01-02 02:31:39 +00:00
test_live_collector_core.py gh-138122: Fix sample counting for filtered profiling modes (#142677) 2025-12-14 03:31:51 +00:00
test_live_collector_interaction.py Test: remove unintended unittest.main() in live collector tests (#143590) 2026-01-09 08:49:54 +00:00
test_live_collector_ui.py gh-143040: Exit taychon live mode gracefully and display profiled script errors (#143101) 2025-12-27 00:36:15 +00:00
test_modes.py gh-138122: Move local imports to module level in sampling profiler (#143257) 2026-01-02 02:31:39 +00:00
test_profiler.py gh-149296: Add dump subcommand to sampling profiler for one-shot stack snapshots (#149297) 2026-05-04 01:02:33 +01:00
test_trend_tracker.py gh-141645: Add a TUI mode to the new tachyon profiler (#141646) 2025-11-20 18:27:17 +00:00