Skip to content

Commit 2913baf

Browse files
committed
fix: reenable gc logic
1 parent 1a8df36 commit 2913baf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/pytest_codspeed/plugin.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,17 +261,15 @@ def _measure(
261261
) -> T:
262262
is_gc_enabled = gc.isenabled()
263263
if is_gc_enabled:
264-
pass
265-
# gc.collect()
266-
# gc.disable()
264+
gc.collect()
265+
gc.disable()
267266
try:
268267
uri, name = get_git_relative_uri_and_name(nodeid, config.rootpath)
269268
return plugin.instrument.measure(name, uri, fn, *args, **kwargs)
270269
finally:
271270
# Ensure GC is re-enabled even if the test failed
272271
if is_gc_enabled:
273-
pass
274-
# gc.enable()
272+
gc.enable()
275273

276274

277275
def wrap_runtest(

0 commit comments

Comments
 (0)