Skip to content

Commit

Permalink
feat: updated benchmark_read_stella_model.py
Browse files Browse the repository at this point in the history
  • Loading branch information
officialasishkumar committed Mar 13, 2024
1 parent 2e93c43 commit 02c39c8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions benchmarks/benchmark_read_stella_model.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
"""Basic TARDIS Benchmark."""
import os
from tardis.io.model.readers.stella import read_stella_model
from tardis.io.model import read_stella_model


class Benchmarkruntardis:
"""Class to benchmark the run_tardis function.
class Benchmark_read_stella_model:
"""Class to benchmark the read_stella_model function.
"""
timeout = 200

def setup(self):
filename = "messa.stella.dat"
dir_path = os.path.dirname(os.path.realpath(__file__))
path = os.path.join(dir_path, "data", filename)
config = read_stella_model(path)
self.config = config
self.path = path

def time_run_stella_model(self):
stella_model = read_stella_model(self.config)
stella_model = read_stella_model(self.path)
stella_model

0 comments on commit 02c39c8

Please sign in to comment.