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 Nov 5, 2024
1 parent 7574dd9 commit 2a0807f
Show file tree
Hide file tree
Showing 2 changed files with 7 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
6 changes: 6 additions & 0 deletions hwbench/bench/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ def __init__(
self.skip_method = skip_method
self.sync_start = sync_start

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":
return ""
Expand Down

0 comments on commit 2a0807f

Please sign in to comment.