Khronos is a Python library that benchmarks the duration of Django tests. It helps identify slow-running tests in your test suite, allowing you to optimize their performance.
Project description
Khronos
Are your org hotfixes truly considered "hotfixes" if they take longer than 15 minutes to go live because of slow tests workflows running on GitHub Actions? To speed up this imagine benchmarking test durations to identify the slow tests when the total number of tests > 500, it seems impractical to run each test individually and manually record their duration times.
Khronos is a Python library that benchmarks the duration of Django tests. It helps identify slow-running tests in your test suite, allowing you to optimize their performance.
Feautres:
1) Benchmark Report: Create benchmark report in the terminal whenever you run your django tests and shows top 10(this no. can be configured) slowest tests.
2) Parallel Test Execution: Works with --parallel
out of the box.
3) Google Sheets Integration: Whole tests benchmark can be automatically uploaded to Google Sheets.
4) CSV Export: Whole tests benchmark can be saved in a CSV.
How to configure:
python -m build
and install in your virtual env.- Add
TEST_RUNNER = "khronos.custom_test_runner.KhronosTestRunner"
in yoursettings.py
- If you want to increase the number of slowest tests displayed on terminal then set
KHRONOS_REPORT_MAX_ROW=
in yoursettings.py
. - If you want to add Google Sheets integration, add:
KHRONOS_SPRAEDSHEET_REPORT_GSHEET_ID = "your-google-sheet-id"
and yourKHRONOS_GSHEET_CREDS_FILE_PATH = "your-gsheet-cred-path" in your
settings.py` . - For saving the khronos benchmark report.
Tested on Django 3.2.14
. Open an issue if it's not supported in your's django version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-khronos-0.1.1.tar.gz
.
File metadata
- Download URL: django-khronos-0.1.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dee4b19b05d5fb70c9812b9b31c6bbe3c6486ecbf0963e4f67a5bc412b7a76bc |
|
MD5 | fb095041ecccf10b74345f5ee50101a9 |
|
BLAKE2b-256 | 086405e53127ea669cd0e5f470a939a3c19f3cf9e634b1c0ae6b80955fd22b7b |
Provenance
File details
Details for the file django_khronos-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: django_khronos-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd4dd78b6a57b6226393b2b1b14d7482d2997b8da0da8b3ef628b8fbf1a5e1cd |
|
MD5 | 7422a16ace8505857cb4461ee02254c5 |
|
BLAKE2b-256 | b953612938aa56e45e9c3d4d6a53507f1ddf1128bb40fb60ff6f5bc86a1defb0 |