benfred / py-spy

Sampling profiler for Python programs
MIT License
12.16k stars 401 forks source link

Idle information on record #545

Open narroyo1 opened 1 year ago

narroyo1 commented 1 year ago

Is it possible to use the record command and have idle information in the output? Possibly by aggregating idle traces from active traces?

benfred commented 1 year ago

You can pass --idle to the command line arguments, and those frames won't get filtered out from the results - does this work for you?

narroyo1 commented 1 year ago

Thank you for your reply. What I would like is that the output showed the thread state with the stacks, similar to what you get when using "py-spy dump":

Thread <tid> (idle)
    ...

but when using "py-spy record". Is there a setting for this?