Skip to content

Running mprof with python -m #343

Open

Description

@JPFrancoia

Hello,

Most of the time I run my Python softwares like this: python -m package.module.module. This is generally better than doing python path/path/script.py, because imports are resolved properly.

I can use this and still profile with mprof: mprof run python -m package.module.module. This works well, but if I want timestamps for functions to be recorded, it doesn't work, i.e: if I remove from memory_profile import profile from my code, I get an import error when I use the @profile decorator.

I've read the doc and searched the issues but I couldn't find a solution. Could you help me please?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions