Metadata-Version: 2.1
Name: django-khronos
Version: 0.1.1
Summary: 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.
Home-page: https://github.com/abhinavsp0730/khronos/
Author: Abhinav Prakash
Author-email: abhinavsp0730@gmail.com
License: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# 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.   
<img src="https://i.ibb.co/W0LS1cQ/419d86a9-d1ca-4e80-9b62-fc43855c1e2e.jpg" width="300">  
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: 
1) `python -m build` and install in your virtual env. 
2) Add `TEST_RUNNER = "khronos.custom_test_runner.KhronosTestRunner"` in your `settings.py`  
3) If you want to increase the number of slowest tests displayed on terminal then set ` KHRONOS_REPORT_MAX_ROW=` in your `settings.py`.  
3) If you want to add Google Sheets integration, add:
`KHRONOS_SPRAEDSHEET_REPORT_GSHEET_ID = "your-google-sheet-id"` and your `KHRONOS_GSHEET_CREDS_FILE_PATH = "your-gsheet-cred-path" in your `settings.py` .   
4) 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**
