oslo.rootwrap/tox.ini
Yuriy Taraday 196bdc0fa2 Add basic benchmark
Benchmark shows performance penalty rootwrap introduces compared to one of
plain sudo.

To run benchmark, issue: tox -e benchmark

Example output:

Running 'ip a':
        method          :    min       avg       max       dev
                   ip a :   4.185ms   4.570ms   5.657ms 187.705us
              sudo ip a :  13.564ms  14.437ms  28.452ms   1.470ms
sudo rootwrap conf ip a : 148.839ms 192.424ms 254.043ms  19.219ms
Running 'ip netns exec bench_ns ip a':
                    method                     :    min       avg       max       dev
              sudo ip netns exec bench_ns ip a : 109.772ms 151.627ms 209.943ms  22.991ms
sudo rootwrap conf ip netns exec bench_ns ip a : 289.345ms 345.471ms 463.807ms  32.873ms

Change-Id: Id8e41be6602fa8dcff48a8a4ba44d35dd3043731
2014-07-28 13:46:52 +04:00

32 lines
633 B
INI

[tox]
minversion = 1.6
envlist = py33,py26,py27,pep8
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:pep8]
commands = flake8
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =
python setup.py testr --coverage
[testenv:venv]
commands = {posargs}
[flake8]
show-source = True
exclude = .tox,dist,doc,*.egg,build
builtins = _
[testenv:benchmark]
commands = python benchmark/benchmark.py