timholy / ProgressMeter.jl

Progress meter for long-running computations
MIT License
694 stars 91 forks source link

Normalization for showspeed #237

Open milankl opened 2 years ago

milankl commented 2 years ago

https://github.com/timholy/ProgressMeter.jl/blob/83e619faed2780ab5d6929777c8f6151e3b88c5e/src/ProgressMeter.jl#L683-L700

At the moment speed is always shown as time/iteration which is nice because it's general. However, when running many simulations, the loop is over time so often people think in terms of simulated time per wall clock time. E.g. in weather forecasting we often think in terms of simulated days per day. Is there general interest for a PR to extend Progress(...,speednorm::Dates.Period) with speednorm of units simulated time / iteration (= the time step) to allow for say

1 m/it

to be displayed with speednorm=Dates.Minute(30) meaning that every iteration simulates a 30min time step as

30 m/m

?

@samhatfield what we just discussed

milankl commented 1 year ago

SpeedyWeather.jl has this now implemented as

Weather is speedy: 100%|███████████████████████████████| Time: 0:00:29 (80.91 years/day)

Meaning the model ran at a speed such that in 1 day it would simualte 80 years of the Earth's atmosphere. If there's more general interest to make this feature available here too let me know. I believe it would be of interest to anyone who would use it to monitor the progress of a simulation which integrates in time