Skip to content

Commit

Permalink
Changing benchmark.yml and core.py back to normal
Browse files Browse the repository at this point in the history
  • Loading branch information
willcollins10 committed Dec 8, 2024
1 parent 65e5943 commit 3cab05e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -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
17 changes: 1 addition & 16 deletions benchmarks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

0 comments on commit 3cab05e

Please sign in to comment.