Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need info in the case of line profiler as a custom decorator for dynamic profiling #281

Closed
eswarthammana opened this issue Jun 25, 2024 · 1 comment

Comments

@eswarthammana
Copy link

eswarthammana commented Jun 25, 2024

windows 10
python 3.11
line_profiler 4.1.3

Hi Team, thanks for the tool, I was trying a sample with Django application to profile the complete functions (individual functions and methods with in the class.)

custom profiler decorator, do we have any functions in line_profiler that achieve? and also while i am performing with static methods i am facing a challenge that, expected arguments were 1 but 2 were given.

Do you have any suggestions that I can modify the code to support static methods. Thanks for your time

@Erotemic
Copy link
Member

You might want to look into the "autoprofile" feature, which adds profile decorators (statically via AST transforms, before the code is even executed). It doesn't have this CSV feature, but you might not want to perform that for every function as it will add a lot of overhead, instead it might be better to collect all of this information from a single profiling object at the end of the script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants