import line_profiler
profile = line_profiler.LineProfiler()
@profile
def my_function_in_django_code():
....
with open('output.txt', 'w') as stream:
profile.print_stats(stream=stream)
return something
Created
July 25, 2022 21:14
-
-
Save zhoudaxia233/052da6877c88e0f059ac7a14d985b8e0 to your computer and use it in GitHub Desktop.
use line_profiler in django
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment