Skip to content

Display class name ?Β #722

@ocervell

Description

@ocervell

Hi,

Would it be possible to have an option to display the class name when calling class / instance methods ?

Let me explain my use case for https://github.com/freelabz/secator:

I have a base class Runner and many derived classes that each have their own name (httpx, naabu, nmap, ...) and implement the yielder() function differently. My goal is to get precise profiling information about each of those derived classes.

In my flamegraph, I'm seeing the same function yielder take a lot of time, but I can't distinguish between the derived classes other than by the order they are run at.

pyinstrument gives me httpx.yielder, nmap.yielder, etc... which makes it easy to understand what's going on, but py-spy only gives me the function name. I like py-spy because it supports multi-threading, but without this feature I don't have a clear view on my app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions