Skip to content
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

Fix show all #239

Merged
merged 9 commits into from
May 6, 2023
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: requirements-dev.txt
2 changes: 2 additions & 0 deletions pyinstrument/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ def compute_render_options(

if options.timeline:
render_options["timeline"] = True
if options.show_all:
render_options["show_all"] = True

# apply user options
if options.render_options is not None:
Expand Down
13 changes: 12 additions & 1 deletion pyinstrument/renderers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,18 @@ def __init__(
self.processor_options = processor_options or {}

if show_all:
self.processors.remove(processors.group_library_frames_processor)
for p in (
processors.group_library_frames_processor,
processors.remove_importlib,
processors.remove_irrelevant_nodes,
processors.remove_tracebackhide,
# note: we're not removing these processors
# processors.remove_unnecessary_self_time_nodes,
# (still hide the inner pyinstrument synthetic frames)
# processors.remove_first_pyinstrument_frames_processor,
# (still hide the outer pyinstrument calling frames)
):
self.processors.remove(p)
if timeline:
self.processors.remove(processors.aggregate_repeated_calls)

Expand Down