-
Notifications
You must be signed in to change notification settings - Fork 271
Description
When we report progress (code), we want to show the processing rate during last 1 minute.
It doesn't have to be exactly 1 minute. A good enough way is to piggyback on the existing tick on stats report (code), record (time, count) on each tick, and look back to find the latest record that is 1 min ago (or the first record). Use the "delta of counter / delta of duration" to calculate the rate. Example:
00:00:00, 0
00:00:21, 15 <- rate=15/21
00:00:40, 32 <- rate=32/40
00:00:61, 50 <- rate = 50/61
00:00:81, 77 <- rate = (77-15)/(81-21)
We can show it in the bracket together with elapsed time, e.g. [elapsed: 32s, 2.231/s now]. Please show 3 digits after ..
To contributors ❤️: Please leave a comment I'm working on this if you decide to take it - to better communicate with other contributors :)