-
-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated benchmark_read_stella_model.py
- Loading branch information
1 parent
2e93c43
commit 02c39c8
Showing
1 changed file
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |