time monitoring
Project description
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
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
tprogress-0.0.6.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for tprogress-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8f1258a1f94ac6d23fec0a13b25cb6b90c2fc1c1fe0bbb036b9824a39f1dc90 |
|
MD5 | 228fdf35ac96883f27132c9169efe0ca |
|
BLAKE2b-256 | 2ed0672153d8aa343be2a85caa827163836a10bc2a20451d364d016823ac6649 |