Skip to main content

Run Python scripts and see execution time + memory usage in your terminal

Project description

cntimer ⏱️

Run any Python script and instantly see execution time + memory usage in your terminal.

pip install cntimer

Usage

cntimer myscript.py

Output:

hello world

────────────────────────────────────────────────────────────
  🕐 Time      21.4 ms       (cpu: 20.9 ms)
  📦 Memory    96 KB         (peak: 19.0 MB)
────────────────────────────────────────────────────────────

Pass arguments to your script too:

cntimer myscript.py arg1 arg2

What the stats mean

Stat Meaning
Time Total real-world clock time
cpu Actual CPU processing time (excludes I/O wait)
Memory Memory in use when the script finished
peak Maximum memory used during the entire run

Requirements

  • Python 3.8+
  • No external dependencies — uses only the standard library ✅

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cntimer-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cntimer-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file cntimer-0.1.0.tar.gz.

File metadata

  • Download URL: cntimer-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for cntimer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 09f98377711d5a9420bb8c3a4339ba97dc15752782858a1450143d54e79817de
MD5 619b5fead3ced39157186f9715dbfd0f
BLAKE2b-256 f34a76b6e8fd8e451efeb9ec12fc87fbe0f498c244f7bb40512e024d02bbe414

See more details on using hashes here.

File details

Details for the file cntimer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cntimer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for cntimer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b97e68d4b175eaeabf297ac9142b1ba8faa8d8406975da19eb1cc8a2c829d394
MD5 af2c05bfcc0f2846edd9c7787a8fbd97
BLAKE2b-256 fdceda8e3f992f2179a3ad6c5d1c2bdb5817f27fc5bc450f2290c92cdedc3946

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page