From 3cab05e0465aceb8e420f9cc289052140d6990c4 Mon Sep 17 00:00:00 2001 From: will collins Date: Sun, 8 Dec 2024 15:12:46 -0500 Subject: [PATCH] Changing benchmark.yml and core.py back to normal --- .github/workflows/benchmark.yml | 5 +---- benchmarks/core.py | 17 +---------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6b0ed8b9..64e4c433 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -3,9 +3,6 @@ on: push: branches: - main - pull_request: - branches: - - main workflow_dispatch: permissions: @@ -40,4 +37,4 @@ jobs: # Show alert with commit comment on detecting possible performance regression alert-threshold: '200%' comment-on-alert: false - fail-on-alert: true + fail-on-alert: true \ No newline at end of file diff --git a/benchmarks/core.py b/benchmarks/core.py index e1d28fb9..2aca9eb8 100644 --- a/benchmarks/core.py +++ b/benchmarks/core.py @@ -4,21 +4,6 @@ fname = "benchmarks/email-enron.json" -# Below is an example so I can better understand the control flow -def test_simple_benchmark(benchmark): - """A simple benchmark to test the workflow.""" - def setup(): - # No setup needed for this simple test - return (), {} - - def run_benchmark(): - x = 0 - for i in range(1000): - x += i - return x - - benchmark.pedantic(run_benchmark, setup=setup, rounds=rounds) - def test_construct_from_edgelist(benchmark): def setup(): H = xgi.read_hif(fname) @@ -172,4 +157,4 @@ def setup(): def dual(H): H.dual() - benchmark.pedantic(dual, setup=setup, rounds=rounds) + benchmark.pedantic(dual, setup=setup, rounds=rounds) \ No newline at end of file