Quite often I have to benchmark and optimise the render function of projects that I’m working on.
To make it easier I added logTime to my fork of the core Debug package. It just wraps a function and runs console.time(name) and console.timeEnd(name) around it, which prints the evaluation time to the console.
To benchmark something like this:
view : Model -> Html msg
view model =
div
[]
[ renderHeader model
, renderContent model
, renderFooter model
]
I just could do this
view : Model -> Html msg
view model =
div
[]
[ Debug.logTime "header" renderHeader model
, Debug.logTime "content" renderContent model
, Debug.logTime "footer" renderFooter model
]
This will print the time in ms in the console:

Additionally, in Chrome it will also be printed on the Performance timeline which is very useful. Probably other browsers have this too.
This also works well for remote debugging on Android or IOS, checking for performance bottlenecks on lower end devices.
If this is something you would find useful enough to motivate making a PR? Maybe it is already in some other package?