{"repo":"rsalmei/about-time","free":true,"listed":false,"github":"https://github.com/rsalmei/about-time","clone":"git clone https://github.com/rsalmei/about-time.git","description":"A cool helper for tracking time and throughput of code blocks, with beautiful human friendly renditions.","language":"Python","stars":69,"topics":["python","measure","time","timing","timings","statistics","stats","metrics","tracking","tracker"],"license":"MIT","category":"analytics","readme_excerpt":"about-time A cool helper for tracking time and throughput of code blocks, with beautiful human friendly renditions. What does it do? Did you ever need to measure the duration of an operation? Yeah, this is easy. But how to: - measure the duration of two or more blocks at the same time, including the whole duration? - instrument a code to cleanly retrieve durations in one line, to log or send to time series databases? - easily see human friendly durations in s (seconds), ms (milliseconds), µs (microseconds) and even ns (nanoseconds)? - easily see human friendly counts with SI prefixes like k , M , G , T , etc? - measure the actual throughput of a block? (this is way harder, since it needs to measure both duration and number of iterations) - easily see human friendly throughputs in \"/second\", \"/minute\", \"/hour\" or even \"/day\", including SI prefixes? Yes, it can get tricky! More interesting details about duration and throughput. If you'd tried to do it without these magic, it would probably get messy and immensely pollute the code being instrumented. I have the solution, behold! This main() function prints: How cool is that? 😲👏 You can also get the duration in seconds if needed: But 95.6ms is way better, isn't it? The same with count and throughput ! So, about time measures code blocks, both time and throughput, and converts them to beautiful human friendly representations! 👏 Get it Just install with pip: Use it There are three modes of operation: context manager, callable an","default_branch":null,"files":null,"tree":[],"storefront":"/r/rsalmei","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rsalmei/about-time/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}