Skip to content

Commit

Permalink
benchmark: Link parameter with benchmark
Browse files Browse the repository at this point in the history
The parameter has no link to the benchmark preventing engines extracting
the benchmark properties including the current job number.

This will be needed by fio to name its jobs.

Signed-off-by: Erwan Velu <[email protected]>
  • Loading branch information
ErwanAliasr1 committed Oct 30, 2024
1 parent bb49d56 commit c30fc5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions hwbench/bench/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def __init__(
self.job_number = job_number
self.enginemodule = enginemodule
self.parameters = parameters
self.parameters.benchmark = self

def get_enginemodule(self) -> EngineModuleBase:
return self.enginemodule
Expand Down
7 changes: 7 additions & 0 deletions hwbench/bench/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ def __init__(
self.monitoring = monitoring
self.skip_method = skip_method
self.sync_start = sync_start
self.benchmark = None

def get_benchmark(self):
return self.benchmark

def set_benchmark(self, benchmark):
self.benchmark = benchmark

def get_pinned_cpu(self):
if self.pinned_cpu == "none":
Expand Down

0 comments on commit c30fc5a

Please sign in to comment.