py-spy 的用法

py-spy 的用法

watch -n 5 "py-spy top --pid <PID> --nonblocking --rate 50" | tee -a pyspy_top.log
watch -n 5 "py-spy top --pid 172877 --nonblocking  --rate 100" | tee -a pyspy_top.log

2025年04月09日22:29:16

0.5qps发压 hbe

每10秒采集3秒python进程火焰图

py-spy record --pid 240477 -s 会记录 profile ,然后生成一个svg火焰图,可以查看cpu性能消耗在什么地方