Better document @profile usage #18
Comments
Yes, it's always required. Does this new wording help? |
Well, my bigger issue right now is that I'm not sure how to actually import it.
|
But yeah that new wording definitely makes it clear I need something, just not sure what yet. |
You don't instantiate it. Running |
Sorry, |
|
Hmm. Perhaps it just isn't working for me then, and isn't a documentation issue:
|
Is the |
No, it doesn't take any arguments. Without the |
Can you upload (gist) an |
Do omit the |
It would take me too long to redact all the sensitive stuff, but here's a smaller version that recreates the same issue: https://gist.github.com/dellis23/d5251031787ff370f15f And the output:
|
There's no |
You have some options, like refactoring the body of the function to a function all by itself, Also try a non-Flask script to see if |
Doh, yeah, I put the Thanks for the help -- hopefully it at least guides someone else in the right direction if they are trying it with Flask. |
Thanks. I've added an issue to document the issues with multiple decorators. #19 |
This seems to be an issue with flask's reloader, rather than an issue of multiple decorators. Also, Flask's documentation mentions "When applying further decorators, always remember that the route() decorator is the outermost" An example of kernprof working with flask can be seen in this gist: https://gist.github.com/stickytruth/39c3fa2c88f141a0a26b |
Ah, good detective work! Thanks! |
I ran into this issue in virtualenv -- are there issues there?
|
It's unclear to me as to whether this is required, but after running without using this decorator anywhere, I got no results, so I'm assuming it is. I tried importing
line_profiler
in ipython and seeing if the decorator was there, but I didn't see it. I'm digging through the code now to see if I can figure it out.The text was updated successfully, but these errors were encountered: