benfred / py-spy

Sampling profiler for Python programs
MIT License
12.14k stars 400 forks source link

Profiling multiple PIDs #615

Open zhengwy888 opened 9 months ago

zhengwy888 commented 9 months ago

some times I will need to profile RPC applications and it would be useful to have the speedscope of both the client and the server in the same file. Looks like I would use the '--format raw' + concat option to combine multiple traces, but wondering if it's possible to allow '--pid' to accept a list of pids so the profiles starts at the same time.