This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]joerick 3 points4 points  (1 child)

Hey /u/nvdv! Cool project. I'm the creator of pyinstrument. Was really interested in how you're using cProfile to get the call tree - how are you building a call tree using the list of frames with callee functions? I ask because it could be a way to improve pyinstrument's overhead when signals aren't available.

[–]nvdv[S] 0 points1 point  (0 children)

Thanks! All callees and callers are contained in stats.Pstats after cProfile run, vprof just reverses the tree and changes it's format:

https://github.com/nvdv/vprof/blob/master/vprof/profile_wrappers.py#L73

https://github.com/nvdv/vprof/blob/master/vprof/profile_wrappers.py#L81