Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to prevent execution #104

Merged
merged 2 commits into from
Aug 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ language: python
matrix:
include:
- python: "2.7"
before_install:
- pip install coveralls pylint
env: COVERAGE="--with-coverage --cover-package=rebench"
after_success:
coveralls
- python: "3.6"
before_install:
- pip install coveralls pylint
# PyPy versions
- python: pypy
env: DO_LINT="echo On PyPy, we won't "
- python: pypy3
env: DO_LINT="echo On PyPy, we won't "

dist: trusty
sudo: false
Expand All @@ -17,14 +26,10 @@ addons:
- time

install:
- pip install coveralls pylint
- pip install .

# command to run tests
script:
- nosetests --with-coverage --cover-package=rebench
- nosetests ${COVERAGE}
- (cd rebench && rebench -N ../rebench.conf e:TestRunner2)
- pylint rebench

after_success:
coveralls
- ${DO_LINT} pylint rebench
11 changes: 11 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,17 @@ For this purpose we use *schedulers* to determine the execution order.
random [default: batch]
```

#### Prevent Execution to Verify Configuration

To check whether a configuration is correct, it can be useful to avoid
execution altogether. For such *testing* or *dry run*, we have the following
option:

```text
-E, --no-execution Disables execution. It allows to verify the
configuration file and other parameters.
```

#### Continuous Performance Tracking

ReBench supports [Codespeed][1] as platform for continuous performance
Expand Down
11 changes: 10 additions & 1 deletion rebench/rebench.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def shell_options(self):
default='batch',
help='execution order of benchmarks: '
'batch, round-robin, random [default: %(default)s]')
execution.add_argument(
'-E', '--no-execution', action='store_true', dest='no_execution',
default=False,
help='Disables execution.'
' It allows to verify the configuration file and other parameters.')

data = parser.add_argument_group(
'Data and Reporting',
Expand Down Expand Up @@ -220,7 +225,11 @@ def execute_experiment(self, runs):
self._config.options.debug,
scheduler_class,
self._config.build_log)
return executor.execute()

if self._config.options.no_execution:
return True