Skip to content

Commit

Permalink
update benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkent committed Aug 14, 2024
1 parent 537010b commit 3e6b479
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,14 @@ on:

jobs:
benchmark:
name: benchmark
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install asv
pip install -r requirements.txt
- name: Run benchmarks
run: |
asv run NEW --show-stderr --python=same
asv compare -s 1.2 NEW
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- uses: actions/checkout@v3
- run: git fetch origin $GITHUB_BASE_REF:base $GITHUB_REF:pr
- run: pip install asv virtualenv
- run: asv machine --yes
- run: asv continuous base pr --strict -e
7 changes: 4 additions & 3 deletions benchmarks/bench_cbma.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import os

import nimare
from nimare.meta.cbma import ALE, MKDADensity, KDA, MKDAChi2
from nimare.tests.utils import get_test_data_path


class TimeCBMA:
def setup(self):
self.dataset = nimare.dataset.Dataset(get_test_data_path())

self.dataset = nimare.dataset.Dataset(os.path.join(get_test_data_path(), "test_pain_dataset.json"))
def time_ale(self):
meta = ALE()
meta.fit(self.dataset)
Expand All @@ -21,4 +22,4 @@ def time_kda(self):

def time_mkdachi2(self):
meta = MKDAChi2()
meta.fit(self.dataset)
meta.fit(self.dataset, self.dataset)

0 comments on commit 3e6b479

Please sign in to comment.