Another solution which would not require any alteration to Cake would
be to install the xdebug module to php and use it's profiling
capabilities. This will generate a lot more info than you need, but
will let you know where all the bottlenecks in your app are down to
the line of code level.

Simon

On 28 Jun, 10:04, Geoff Ford <[EMAIL PROTECTED]> wrote:
> If you want to leverage what is already in cake you will need to
> modify some core files.
>
> In cake/libs/model/datasources/dbo_source.php in function execute()
> (around lines 277-280) you can manually log the query and time ($this-
>
> >took) to a log file.
>
> Same in app/webroot/index.php for total execution time
>
> On Jun 28, 5:10 pm, hi and hello <[EMAIL PROTECTED]> wrote:
>
> > Thank you, but there still exists a problem .
> > Because I use AJAX in my website and return the data as JSON format,
> > so I can not let cakephp append the debug infor to the response. And I
> > want to read the the infor at a console or a log file?  Can I do it?
>
> > On 6月28日, 下午2时21分, Geoff Ford <[EMAIL PROTECTED]> wrote:
>
> > > For query times put DEBUG on level 2 in core.php A table will show at
> > > the bottom of the page with all your sql queries including a "Took
> > > (ms)" column.
> > > For total page execution - on DEBUG level 2 there is a comment
> > > rendered in the source with the execution time (right at the bottom)
>
> > > On Jun 28, 3:36 pm, hi and hello <[EMAIL PROTECTED]> wrote:
>
> > > >  I am using cakephp to build a website and at last I found the
> > > > performance is not very well.
> > > >  So I want to know if it exits a tool by which I can get the execution
> > > > time of PHP code and DB access?
> > > > Or how can I write the tool ?
> > > >                thanks very much!!!- 隐藏被引用文字 -
>
> > > - 显示引用的文字 -


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to