Automatic execution time and memory tracker — works with every Python script, no code changes needed.
Project description
cntimer ⏱
Automatic execution time and memory tracker for Python scripts.
No code changes. No config. Just install and every script you run will show timing and memory at the end — automatically.
Install
pip install cntimer
That's it. From now on, every time you run a Python script (in VSCode, terminal, anywhere), you'll see:
────────────────────────────────────────────
📄 stress_test.py
────────────────────────────────────────────
⏱ Time 3.821s
📦 Memory 284.50MB
🔺 Peak 412.18MB
────────────────────────────────────────────
How it works
When you pip install cntimer, it automatically places a sitecustomize.py file in your Python's site-packages directory. Python loads this file on every startup, before your script runs — which is what makes the tracking completely automatic.
No imports. No decorators. No wrappers.
Uninstall
pip uninstall cntimer
Then remove the hook:
cntimer --uninstall
Manual usage (optional)
You can also run it explicitly if you prefer:
cntimer script.py
Re-install hook
If you ever need to re-install the hook (e.g. after switching Python versions):
cntimer --install
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cntimer-0.1.1.tar.gz.
File metadata
- Download URL: cntimer-0.1.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5543ebb8b5cb9612dcc6caa309882e327149815a135a0aa0c8c6213b1839dec7
|
|
| MD5 |
7cbfdfba33ed25473fb1d351f8a80f41
|
|
| BLAKE2b-256 |
2214096aa95dd0699ccb6b061cd76098747112a215cc810334739f772e7b4baf
|
File details
Details for the file cntimer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cntimer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cdd9de9281d80589972409dc079e57aee52defe41760df0033aa88d1a866cee
|
|
| MD5 |
1f4cffca888f4a3d8ab79ccf5c9d1a21
|
|
| BLAKE2b-256 |
a4748adbfc33f2c23a698994d7aa124fe9a0f2d33e8bdadec7cc0102286bb1aa
|