dev-python/pytest-benchmark: new package

Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2020-03-29 11:20:02 +02:00
parent 853d621236
commit 8a000ba421
3 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST pytest-benchmark-3.2.3.tar.gz 321127 BLAKE2B a9fb3a01ac9850d813f9b72d1975010b63b4f9d35d48c683b8dfa5d0020b17c59339135ff63b6152efab3ac33fecbc09aacbe6bcc3a7b0b260a00da317db00bf SHA512 952dbe2a9af1ae5de966543eae3b4523a5418c8441785714cbb7a5d17697046f060befb4a40cf216526e2a9a63d91c598d65e65618bd78fc2d889c92cecbbe53

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>lssndrbarbieri@gmail.com</email>
<name>Alessandro Barbieri</name>
</maintainer>
<longdescription lang="en">
This plugin tightly integrates into pytest. To use this effectively you should know a thing or two about pytest first. Take a look at the introductory material or watch talks.
Few notes:
This plugin benchmarks functions and only that. If you want to measure block of code or whole programs you will need to write a wrapper function.
In a test you can only benchmark one function. If you want to benchmark many functions write more tests or use parametrization http://docs.pytest.org/en/latest/parametrize.html.
To run the benchmarks you simply use pytest to run your "tests". The plugin will automatically do the benchmarking and generate a result table. Run pytest --help for more details.
This plugin provides a benchmark fixture. This fixture is a callable object that will benchmark any function passed to it.
</longdescription>
<upstream>
<remote-id type="github">ionelm/pytest-benchmark</remote-id>
<remote-id type="pypi">pytest-benchmark</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,41 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
#DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_6 )
inherit distutils-r1
DESCRIPTION="py.test fixture for benchmarking code "
HOMEPAGE="
https://pypi.python.org/pypi/pytest-benchmark
https://github.com/ionelmc/pytest-benchmark
"
SRC_URI="https://github.com/ionelmc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="
dev-python/py-cpuinfo[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
test? (
dev-python/aspectlib[${PYTHON_USEDEP}]
dev-python/elasticsearch-py[${PYTHON_USEDEP}]
dev-python/freezegun[${PYTHON_USEDEP}]
dev-python/hunter[${PYTHON_USEDEP}]
dev-python/pygal[${PYTHON_USEDEP}]
dev-python/pygaljs[${PYTHON_USEDEP}]
dev-python/pytest-instafail[${PYTHON_USEDEP}]
dev-python/pytest-travis-fold[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
distutils_enable_sphinx docs dev-python/sphinx-py3doc-enhanced-theme