-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR #170: Enable settings to be marked as important
- Loading branch information
Showing
8 changed files
with
205 additions
and
15 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
benchmark_suites: | ||
Suite1: | ||
command: suite-1 %(benchmark)s %(iterations)s | ||
iterations: 30 | ||
gauge_adapter: Time | ||
benchmarks: | ||
- Bench1: | ||
iterations: 40 | ||
- Bench2 | ||
|
||
Suite2: | ||
command: suite-2 %(benchmark)s %(iterations)s | ||
invocations: 3 | ||
gauge_adapter: Time | ||
benchmarks: | ||
- Bench3 | ||
|
||
Suite3: | ||
command: suite-3 %(benchmark)s %(iterations)s | ||
gauge_adapter: Time | ||
benchmarks: | ||
- Bench4 | ||
|
||
executors: | ||
TestRunner1: | ||
iterations: 10 | ||
invocations: 1 | ||
path: . | ||
executable: exe-1 | ||
|
||
TestRunner2: | ||
iterations: 10 | ||
invocations: 1 | ||
path: . | ||
executable: exe-2 | ||
|
||
experiments: | ||
|
||
Exp1: | ||
suites: | ||
- Suite1 | ||
executions: | ||
- TestRunner1 | ||
iterations: 20 | ||
|
||
Exp2: | ||
executions: | ||
- TestRunner2: | ||
suites: | ||
- Suite1 | ||
- Suite2 | ||
- Suite3 | ||
invocations: 2 |
45 changes: 45 additions & 0 deletions
45
rebench/tests/features/issue_169_config_composition_test.py
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from ..rebench_test_case import ReBenchTestCase | ||
from ...configurator import Configurator, load_config | ||
from ...persistence import DataStore | ||
|
||
|
||
class Issue169ConfigCompositionTest(ReBenchTestCase): | ||
|
||
def setUp(self): | ||
super(Issue169ConfigCompositionTest, self).setUp() | ||
self._set_path(__file__) | ||
self.cnf = Configurator( | ||
load_config(self._path + '/issue_169.conf'), | ||
DataStore(self.ui), self.ui, None, 'all') | ||
self.runs = list(self.cnf.get_runs()) | ||
self.runs = sorted(self.runs, key=lambda e: e.cmdline()) | ||
|
||
self.cnf_important = Configurator( | ||
load_config(self._path + '/issue_169_important.conf'), | ||
DataStore(self.ui), self.ui, None, 'all') | ||
self.runs_important = list(self.cnf_important.get_runs()) | ||
self.runs_important = sorted(self.runs_important, key=lambda e: e.cmdline()) | ||
|
||
def _assert(self, run, exe, bench, iterations, invocations): | ||
self.assertEqual(run.benchmark.suite.executor.name, exe) | ||
self.assertEqual(run.benchmark.name, bench) | ||
self.assertEqual(run.iterations, iterations) | ||
self.assertEqual(run.invocations, invocations) | ||
|
||
def test_confirm_setting_priority(self): | ||
self._assert(self.runs[0], "TestRunner1", "Bench1", 40, 1) | ||
self._assert(self.runs[1], "TestRunner1", "Bench2", 30, 1) | ||
|
||
self._assert(self.runs[2], "TestRunner2", "Bench1", 40, 1) | ||
self._assert(self.runs[3], "TestRunner2", "Bench2", 30, 1) | ||
self._assert(self.runs[4], "TestRunner2", "Bench3", 10, 3) | ||
self._assert(self.runs[5], "TestRunner2", "Bench4", 10, 1) | ||
|
||
def test_confirm_setting_priority_with_important_settings(self): | ||
self._assert(self.runs_important[0], "TestRunner1", "Bench1", 30, 1) | ||
self._assert(self.runs_important[1], "TestRunner1", "Bench2", 30, 1) | ||
|
||
self._assert(self.runs_important[2], "TestRunner2", "Bench1", 30, 2) | ||
self._assert(self.runs_important[3], "TestRunner2", "Bench2", 30, 2) | ||
self._assert(self.runs_important[4], "TestRunner2", "Bench3", 10, 3) | ||
self._assert(self.runs_important[5], "TestRunner2", "Bench4", 10, 2) |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
benchmark_suites: | ||
Suite1: | ||
command: suite-1 %(benchmark)s %(iterations)s | ||
iterations: 30! | ||
gauge_adapter: Time | ||
benchmarks: | ||
- Bench1: | ||
iterations: 40 | ||
- Bench2 | ||
|
||
Suite2: | ||
command: suite-2 %(benchmark)s %(iterations)s | ||
invocations: 3! | ||
gauge_adapter: Time | ||
benchmarks: | ||
- Bench3 | ||
|
||
Suite3: | ||
command: suite-3 %(benchmark)s %(iterations)s | ||
gauge_adapter: Time | ||
benchmarks: | ||
- Bench4 | ||
|
||
executors: | ||
TestRunner1: | ||
iterations: 10! | ||
invocations: 1 | ||
path: . | ||
executable: exe-1 | ||
|
||
TestRunner2: | ||
iterations: 10 | ||
invocations: 1 | ||
path: . | ||
executable: exe-2 | ||
|
||
experiments: | ||
|
||
Exp1: | ||
suites: | ||
- Suite1 | ||
executions: | ||
- TestRunner1 | ||
iterations: 20 | ||
|
||
Exp2: | ||
executions: | ||
- TestRunner2: | ||
suites: | ||
- Suite1 | ||
- Suite2 | ||
- Suite3 | ||
invocations: 2! |