tprogress
Simple time capturing for python, that logs the time passed since last call with logger level.DEBUG.
How-to
Time Logging
- Create tprogress class instance, e.g. timep = tprogress.progress() . Starts the clock.
- Call tprogress.elapsed_time (self,stage='') that returns a formatted string with time and in debug mode the time. The argument stage is a string that can be used to state at what stage the program is when called.
Example
- DEBUG:tprogress:Elapsed Time: 1m 0.683s ( 0: 1:0.7) - Backward Calculation of Rank
Time Monitoring
- Create tprogress class instance, e.g. timep = tprogress.progress(max_num=100,step_size=1,freq=5) . Starts the clock.
- Call tprogress.monitor() within a large for-loop that tells about how far program is and predicts when the loop is finished. The setting is done in the init call:
- max_num: Number of loops, e.g. 100
- step_size: Size of step, e.g. 1
- freq: How often an info print should be done, e.g. 5, every 5th loop iteration
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tprogress-0.0.6.tar.gz
(2.3 kB
view details)
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 tprogress-0.0.6.tar.gz.
File metadata
- Download URL: tprogress-0.0.6.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d28f571d54663d40c1d36ce502c634725cfb4ce09871dc676932aa0aa3142f1
|
|
| MD5 |
f1d7a38cd5cf3eaacb94b2d06a151449
|
|
| BLAKE2b-256 |
9312afb93418038512633f376e6d21f709886e1048291177da3b08093c52bfed
|
File details
Details for the file tprogress-0.0.6-py3-none-any.whl.
File metadata
- Download URL: tprogress-0.0.6-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8f1258a1f94ac6d23fec0a13b25cb6b90c2fc1c1fe0bbb036b9824a39f1dc90
|
|
| MD5 |
228fdf35ac96883f27132c9169efe0ca
|
|
| BLAKE2b-256 |
2ed0672153d8aa343be2a85caa827163836a10bc2a20451d364d016823ac6649
|