Skip to content

Commit

Permalink
rename benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Apr 23, 2024
1 parent cc3ee1f commit 74199d0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions benchmarks/cellfinder_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from brainglobe_workflows.utils import DEFAULT_JSON_CONFIG_PATH_CELLFINDER


class TimeBenchmarkPrepGIN:
class TimeBenchmark:
"""
A base class for timing benchmarks for the cellfinder workflow.
Expand Down Expand Up @@ -142,7 +142,7 @@ def teardown(self):
shutil.rmtree(Path(self.cfg._output_path).resolve())


class TimeFullWorkflow(TimeBenchmarkPrepGIN):
class TimeFullWorkflow(TimeBenchmark):
"""
Time the full cellfinder workflow.
Expand All @@ -151,21 +151,21 @@ class TimeFullWorkflow(TimeBenchmarkPrepGIN):
Parameters
----------
TimeBenchmarkPrepGIN : _type_
TimeBenchmark : _type_
A base class for timing benchmarks for the cellfinder workflow.
"""

def time_workflow(self):
run_workflow_from_cellfinder_run(self.cfg)


class TimeReadInputDask(TimeBenchmarkPrepGIN):
class TimeReadInputDask(TimeBenchmark):
"""
Time the reading input data operations with dask
Parameters
----------
TimeBenchmarkPrepGIN : _type_
TimeBenchmark : _type_
A base class for timing benchmarks for the cellfinder workflow.
"""

Expand All @@ -176,20 +176,20 @@ def time_read_background_with_dask(self):
read_with_dask(str(self.cfg._background_dir_path))


class TimeDetectCells(TimeBenchmarkPrepGIN):
class TimeDetectAndClassifyCells(TimeBenchmark):
"""
Time the cell detection main pipeline (`cellfinder_run`)
Parameters
----------
TimeBenchmarkPrepGIN : _type_
TimeBenchmark : _type_
A base class for timing benchmarks for the cellfinder workflow.
"""

# extend basic setup function
def setup(self):
# basic setup
TimeBenchmarkPrepGIN.setup(self)
TimeBenchmark.setup(self)

# add input data as arrays to the config
self.signal_array = read_with_dask(str(self.cfg._signal_dir_path))
Expand Down Expand Up @@ -225,11 +225,11 @@ def time_cellfinder_run(self):
)


class TimeSaveCells(TimeBenchmarkPrepGIN):
class TimeSaveCells(TimeBenchmark):
# extend basic setup function
def setup(self):
# basic setup
TimeBenchmarkPrepGIN.setup(self)
TimeBenchmark.setup(self)

# add input data as arrays to config
self.signal_array = read_with_dask(str(self.cfg._signal_dir_path))
Expand Down

0 comments on commit 74199d0

Please sign in to comment.