Re: [Cppcms-users] Execution/Page render time
Brought to you by:
artyom-beilis
From: Marcel H. <ke...@co...> - 2012-03-29 07:47:01
|
Oh.. i did not see that you only want the rendering time. I'm sorry. > Well thank you for the help! it is so fast! I have implemented > std::chrono, because I want to show the execution time on the page, > but when is the correct time of render so its as accurate as possible, > below is the algorithm I want to implement, but when or where should > be the time started and where should the time be ended so its as > realistic as possible (since here I'm skipping render time I'm only > using the login time) > void intro() > { > //get start time > content::master c; > //load files and sessions, logic of the page > //get end time and send it to the view render > render("intro",c); //or get the time end on the view itself > (.tmpl) > } Two options. Either you do it this way: start_time(); content::master c; render("intro", c); end_time(); Or you put (caution, it's not recommend) c++ code direct into your template at the end of your render page, where you put the stime into a variable and then print it out. I think both options would be okay, but it's not recommend to put c++ directly into your template. Why? :D I don't know. Just don't do it ;) > > is there a way I should implement it? maybe on other overloaded > functions? or something like preload, to get as realistic as it can be? > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |