Closed Bug 438707 Opened 16 years ago Closed 16 years ago

Make Cake query debug output prettier

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fligtar, Assigned: fligtar)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch, v1 (obsolete) — Splinter Review
While reviewing bug 427094's patch, I decided Cake's query output is ugly and needed some additional info, so this patch overwrites the default methods with our own.

It makes the query log much prettier and makes it collapsed by default and also displays the database config that each query was run on.
Attachment #324697 - Flags: review?(morgamic)
Attached patch patch, v2Splinter Review
Meh, part of morgamic's patch was in that one.
Attachment #324697 - Attachment is obsolete: true
Attachment #324698 - Flags: review?(morgamic)
Attachment #324697 - Flags: review?(morgamic)
Comment on attachment 324698 [details] [diff] [review]
patch, v2

+r=morgamic - extra points if you can figure out why cake has a hard limit in query debug view of 200.  For example, if we have 294 queries executed, it'll only list 200 of them below even if the total is > 200.  I know that's not your fault though.
Attachment #324698 - Flags: review?(morgamic) → review+
I seem to remember it starts over with a second list then? So it shows one list with 200, then another with 94. No?
From http://svn.mozilla.org/addons/trunk/site/cake/libs/model/datasources/datasource.php

/**
 * Maximum number of items in query log, to prevent query log taking over
 * too much memory on large amounts of queries -- I we've had problems at
 * >6000 queries on one system.
 *
 * @var int Maximum number of queries in the queries log.
 * @access private
 */
	var $_queriesLogMax = 200;

But I'll just remove the if() in my overwrite logQuery() so that it doesn't check that var at all.

Fred - From what I can tell, it creates a list per db config used, so it'll have a list for queries run on master and one for default. We just had no way of knowing which was which.
Checked in, r15385.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: