joerick / joerick/pyinstrument

Improve the experience with recursive functions

Open
#293 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
8k
Forks
301
PR merge metrics
No merged PRs in 30d

Description

pyinstrument is a wonderful tool, but it's challenging to use on recursive functions

image

In this case, it's difficult to estimate the sum of the time spent on other functions called by the recursive functions (the ones at the bottom on the following snapshot)

Is there any way of obtaining the flat or cum times (as here) of the most sampled functions?

thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the recursive-function profile described in the issue and reviewing pyinstrument’s current output for recursive calls. Compare it with the flat and cumulative time views described in the linked pprof documentation; the work is done when the issue’s requested way to identify the most sampled functions and their times is clearly implemented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.