Skip to content

Commit 361c751

Browse files
committed
FIX choosing backend in profile decorator fixed
1 parent d0c8a39 commit 361c751

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

memory_profiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,8 @@ def profile(func=None, stream=None, precision=1, backend='psutil'):
966966
Decorator that will run the function and print a line-by-line profile
967967
"""
968968
global _backend
969-
_backend = backend
970969
if not _backend_chosen:
970+
_backend = backend
971971
choose_backend()
972972
if _backend == 'tracemalloc' and not tracemalloc.is_tracing():
973973
tracemalloc.start()

0 commit comments

Comments
 (0)