Measuring the execution time of `gc.collect()` using `time.perf_counter()` or `timeit` directly reveals the performance impact and pause times caused by explicit or automatic full garbage collection cycles.
Open the full topic