Skip to content
Open
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
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ For this purpose we use *schedulers* to determine the execution order.
```text
-s SCHEDULER, --scheduler=SCHEDULER
execution order of benchmarks: batch, round-robin,
random [default: batch]
random, pulling [default: batch]
```

#### Prevent Execution to Verify Configuration
Expand Down
12 changes: 11 additions & 1 deletion rebench/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
import subprocess
import subprocess32 as subprocess

from os.path import dirname

from .model.experiment import Experiment
Expand Down Expand Up @@ -105,6 +106,15 @@ def can_set_niceness():
else:
return True

def cpu_count():
# memoize cpu count, detemination is potentially expensive
if not hasattr(cpu_count, 'count'):
import multiprocessing
cpu_count.count = multiprocessing.cpu_count()
return cpu_count.count

def can_parallelize():
return cpu_count() > 1

def load_config(file_name):
"""
Expand Down
Loading