Skip to content

Repository files navigation

Русский

takt

takt

takt runs pyperformance benchmarks or your own pyperf scripts. It writes every result to one or more SQL databases at once. It then compares results from these databases and from result files.

Installation

SQLite only:

pip install takt-py

With MariaDB support:

pip install "takt-py[mariadb]"

Quick start

Run the nbody benchmark and store the result under the name baseline <today's UTC date>:

takt run -b nbody --fast --db sqlite:///bench.db --name "baseline {date}"

Store a result file you already have under the name patched:

takt import result.json --db sqlite:///bench.db --name patched

Compare the two runs:

takt compare "baseline 2026-09-25" patched --db sqlite:///bench.db

Configuration file

Put takt.toml in the current directory to avoid repeating --db:

name_template = "nightly {date}"

[targets.local]
url = "sqlite:///bench.db"

With this file, takt run -b nbody --fast stores the result in bench.db under the name nightly <date>.

Compatibility

takt Python pyperf pyperformance
0.1.0 >=3.14 >=2.10.0,<2.11 >=1.14.0,<1.15

Documentation

The full documentation is at ashm-dev.github.io/takt. Its sources are in the docs directory. To read it locally:

poetry run mkdocs serve

Development

poetry run pytest
poetry run ruff check .
poetry run ruff format --check .
poetry run flake8 .
poetry run mypy
poetry run mkdocs build --strict
poetry build

A local build with TAKT_MYPYC=1 poetry build copies compiled .so files into src/takt. Python loads them instead of the .py files, so your later edits have no effect and pytest stops with an error. Remove them:

find src/takt -name '*.so' -delete

Author

Shamil Abdulaev, Python developer, CPython and glibc contributor: ashm-dev.github.io.

About

Run pyperformance and pyperf benchmarks and store the results in SQL databases.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages