Login | Register
My pages Projects Community openCollabNet

propel
Reply to message

* = Required fields
* Subject
* Body
Attachments
Send reply to
Topic
Author (directly in email)
Please type the letters in the image above.

Original message

Author Oliver Schonrock <oliver@realtsp.com>
Full name Oliver Schonrock <oliver@realtsp.com>
Date 2007-07-13 01:47:24 PDT
Message Cameron Brunner wrote:
> I would be more interested at this point in offering DebugPropelPDO as
> a connection object type and adding a full array of debug info (query
> timing, counting, dupe query detection) to it and have a flag that
> switches to it when requested. Query timing generally interests me
> more than the count.

I agree with much of this. Query timing would certainly be useful.

There are questions about the tactical details, most of which are
stylistic and there is no "right" answer:

a) do we want a full array of sql strings in an array in memory? Would
this extra information be better in the query log which is already
storing the sql strings (if configured in runtime conf).

b) Do we want to have a "debug" switch in Propel to tell it which PDO
class to instantiate or just add the functionality to the standard
PropelPDO class and then enable the extra logging/counting with
build|runtime config (similar to log now). If we do want to instantiate
different PDO classes, then would we rather pass a Classname into propel
via the build|runtime config? This would give the Propel user lots of
flexibility

c) memory usage reporting as implemented in Cameron's patch may be
slightly misleading as the Stmt::execute (et al) calls don't really use
much memory compared to instantiating the objects from the result set.
Even if you have mysql_buffered_query turned on, the memory used for
buffering the query result is not reported by memory_get_usage(),
although you will see your apache process grow in ps|top (substitute
your own tools here for non *nix/apache users).

d) If we are going to provide a PDOStatement extension as part of
propel, then this gives us the option of moving the Propel::log() call
from PropelPDO::prepare() to the same 3 places where I had incQueryCount
and Cameron had debugQueryLog() (ie 2 places in PropelPDO, and one in
PropelPDOStatement). This would mean we make log file entries when the
query is actually run rather than prepared plus allows the addition of
the extra info (like query time) into the log file.

Thoughts? Opinions?


--

Oliver Schonrock