Skip to content

Commit

Permalink
Merge pull request #50 from criteo/issue48
Browse files Browse the repository at this point in the history
Split Stress-ng code in multiple files
  • Loading branch information
ErwanAliasr1 authored Nov 4, 2024
2 parents 2e1e697 + a94368a commit 7b77661
Show file tree
Hide file tree
Showing 9 changed files with 495 additions and 482 deletions.
4 changes: 2 additions & 2 deletions hwbench/bench/test_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, *args, **kwargs):
# We need to patch list_module_parameters() function
# to avoid considering the local stress-ng binary
with patch(
"hwbench.engines.stressng.EngineModuleCpu.list_module_parameters"
"hwbench.engines.stressng_cpu.EngineModuleCpu.list_module_parameters"
) as p:
print(pathlib.Path("."))
p.return_value = (
Expand Down Expand Up @@ -98,7 +98,7 @@ def get_monitoring_members(metric: Metrics):

def test_stream_short(self):
with patch(
"hwbench.engines.stressng.EngineModuleCpu.list_module_parameters"
"hwbench.engines.stressng_cpu.EngineModuleCpu.list_module_parameters"
) as p:
p.return_value = (
pathlib.Path("./hwbench/tests/parsing/stressngmethods/v17/stdout")
Expand Down
6 changes: 3 additions & 3 deletions hwbench/config/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TestParseConfig(tbc.TestCommon):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
with patch(
"hwbench.engines.stressng.EngineModuleCpu.list_module_parameters"
"hwbench.engines.stressng_cpu.EngineModuleCpu.list_module_parameters"
) as p:
p.return_value = (
pathlib.Path("./hwbench/tests/parsing/stressngmethods/v17/stdout")
Expand Down Expand Up @@ -40,7 +40,7 @@ def test_keywords(self):
# We need to patch list_module_parameters() function
# to avoid considering the local stress-ng binary
with patch(
"hwbench.engines.stressng.EngineModuleCpu.list_module_parameters"
"hwbench.engines.stressng_cpu.EngineModuleCpu.list_module_parameters"
) as p:
p.return_value = (
pathlib.Path("./hwbench/tests/parsing/stressngmethods/v17/stdout")
Expand All @@ -56,7 +56,7 @@ def test_keywords(self):
def test_defaults(self):
"""Check if default values are properly set."""
with patch(
"hwbench.engines.stressng.EngineModuleCpu.list_module_parameters"
"hwbench.engines.stressng_cpu.EngineModuleCpu.list_module_parameters"
) as p:
p.return_value = (
pathlib.Path("./hwbench/tests/parsing/stressngmethods/v17/stdout")
Expand Down
Loading

0 comments on commit 7b77661

Please sign in to comment.