stat-tracker
stat-tracker is a small utility library for short-term record-keeping, such as gathering local metrics inside a function .
Installation
pip install stat-tracker
Usage
stats = StatTracker()
with stats.time1:
sleep(0.05)
for _ in range(5):
stats.value1 += 1
for i in stats.loop1.count(range(10)):
pass
for i in stats('loop2').count(range(100)):
pass
stats.tags.append('a')
stats.tags.extend(['b', 'c'])
print(f'time {stats.time1}') # time 0.05
print(f'added {stats.value1}') # added 5
print(f'counted {stats.loop1}') # counted 10
print(f'counted {stats('loop2')}') # counted 100
print(f'gathered {stats.tags}') # gathered ['a', 'b', 'c']
Metadata
Release files for stat-tracker 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stat_tracker-0.1.0.tar.gz | 32.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stat_tracker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.6 kB
Release files / stat_tracker-0.1.0.tar.gz
| Download URL | stat_tracker-0.1.0.tar.gz |
|---|---|
| Size | 32.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c91b9e62ce221eb02350c0c897ebe393d60c17e9264b1510513759b10f21d550
|
|
BLAKE2b-256 checksum How to use checksums |
ceff89e8fe5dcb6d7adc411b1486c07fd679b0fcc9c33706e9906209f1c0a765
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / stat_tracker-0.1.0-py3-none-any.whl
| Download URL | stat_tracker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94f6546a55ad0dc3ddaad9a0acf8beb1b2f9d29b73df0acd59c44876c5dde5b3
|
|
BLAKE2b-256 checksum How to use checksums |
2187c629476ff3ee451766d6883be9f395ccf38bbabe84b4a6c9dc4665c84765
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|