Display page generation time

22 views
Skip to first unread message

Вячеслав Козлов

unread,
Feb 7, 2013, 6:10:46 AM2/7/13
to chica...@googlegroups.com
Hello!
How i can make display page generation time on my page?

Konstantin Nikiforov

unread,
Feb 7, 2013, 6:24:42 AM2/7/13
to chica...@googlegroups.com
This function (not tested) produces render time in MICROseconds:

my_benchmark() ->
%% Define template vars (or [])
RenderVars = [{a, 123}, {asd, "asdsad"}...],
{TimeMcs, _RenderResult} = timer:tc(fun() ->
myproj_view_main_index_html:render(RenderVars)
end),
TimeMcs.

You also can type function body in chicagoboss console.


В Thu, 7 Feb 2013 03:10:46 -0800 (PST)
Вячеслав Козлов <kozl...@gmail.com> пишет:
signature.asc

Вячеслав Козлов

unread,
Feb 7, 2013, 7:33:25 AM2/7/13
to chica...@googlegroups.com
Thanks
But it is not nice

четверг, 7 февраля 2013 г., 15:24:42 UTC+4 пользователь Konstantin Nikiforov написал:
Reply all
Reply to author
Forward
0 new messages