Skip to content

Commit d7e5486

Browse files
committed
%memit: fix repeats for short-living statements
Based on the comment by leguyader: #212 (comment) Fixes #212
1 parent 70615bc commit d7e5486

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
@@ -1110,7 +1110,7 @@ def memit(self, line='', cell=None):
11101110
counter += 1
11111111
tmp = memory_usage((_func_exec, (stmt, self.shell.user_ns)),
11121112
timeout=timeout, interval=interval,
1113-
max_usage=True,
1113+
max_usage=True, max_iterations=1,
11141114
include_children=include_children)
11151115
mem_usage.append(tmp)
11161116

0 commit comments

Comments
 (0)