Benchmark utility that plugs into pytest.
-
pytest-bench can be installed using
piporeasy_install.pip install pytest-bench
from pytest import mark
import operator
@mark.bench('operator.eq')
def test_eq():
assert operator.eq(1, 1)Now when py.test --bench is run it will benchmark the execution of the operator.eq method.
Unless otherwise noted, all files contained within this project are liensed under the MIT opensource license. See the included file LICENSE or visit opensource.org for more information.

