From 1e819f156c4be3aadfe5c6da65e963fb2a02ecc3 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sat, 3 Dec 2022 14:32:34 +0000 Subject: [PATCH] Add the gc benchmarks to the MANIFEST file Signed-off-by: Pablo Galindo --- pyperformance/data-files/benchmarks/MANIFEST | 2 ++ .../data-files/benchmarks/bm_gc_collect/run_benchmark.py | 2 +- .../data-files/benchmarks/bm_gc_traversal/run_benchmark.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pyperformance/data-files/benchmarks/MANIFEST b/pyperformance/data-files/benchmarks/MANIFEST index 05e1bf5e..6c5d6e07 100644 --- a/pyperformance/data-files/benchmarks/MANIFEST +++ b/pyperformance/data-files/benchmarks/MANIFEST @@ -10,6 +10,8 @@ async_tree_memoization concurrent_imap coroutines coverage +gc_traversal +gc_collect generators chameleon chaos diff --git a/pyperformance/data-files/benchmarks/bm_gc_collect/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_gc_collect/run_benchmark.py index db0e4153..d7014a56 100644 --- a/pyperformance/data-files/benchmarks/bm_gc_collect/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_gc_collect/run_benchmark.py @@ -53,7 +53,7 @@ def benchamark_collection(loops, cycles, links): collected = gc.collect() total_time += pyperf.perf_counter() - t0 - assert collected >= cycles * (links + 1) + assert collected is None or collected >= cycles * (links + 1) return total_time diff --git a/pyperformance/data-files/benchmarks/bm_gc_traversal/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_gc_traversal/run_benchmark.py index 244a6a75..797bd60d 100644 --- a/pyperformance/data-files/benchmarks/bm_gc_traversal/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_gc_traversal/run_benchmark.py @@ -26,7 +26,7 @@ def benchamark_collection(loops, n_levels): collected = gc.collect() total_time += pyperf.perf_counter() - t0 - assert collected == 0 + assert collected is None or collected == 0 return total_time