File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
plugins/sfDoctrinePlugin/lib/database Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,17 @@ class sfTimerManager
2929 *
3030 * @return sfTimer The timer instance
3131 */
32- public static function getTimer ($ name )
32+ public static function getTimer ($ name, $ reset = true )
3333 {
3434 if (!isset (self ::$ timers [$ name ]))
3535 {
3636 self ::$ timers [$ name ] = new sfTimer ($ name );
3737 }
3838
39- self ::$ timers [$ name ]->startTimer ();
39+ if ($ reset )
40+ {
41+ self ::$ timers [$ name ]->startTimer ();
42+ }
4043
4144 return self ::$ timers [$ name ];
4245 }
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public function preQuery(Doctrine_Event $event)
8282 */
8383 public function postQuery (Doctrine_Event $ event )
8484 {
85- sfTimerManager::getTimer ('Database (Doctrine) ' )->addTime ();
85+ sfTimerManager::getTimer ('Database (Doctrine) ' , false )->addTime ();
8686
8787 $ args = func_get_args ();
8888 $ this ->__call (__FUNCTION__ , $ args );
@@ -118,7 +118,7 @@ public function preExec(Doctrine_Event $event)
118118 */
119119 public function postExec (Doctrine_Event $ event )
120120 {
121- sfTimerManager::getTimer ('Database (Doctrine) ' )->addTime ();
121+ sfTimerManager::getTimer ('Database (Doctrine) ' , false )->addTime ();
122122
123123 $ args = func_get_args ();
124124 $ this ->__call (__FUNCTION__ , $ args );
@@ -154,7 +154,7 @@ public function preStmtExecute(Doctrine_Event $event)
154154 */
155155 public function postStmtExecute (Doctrine_Event $ event )
156156 {
157- sfTimerManager::getTimer ('Database (Doctrine) ' )->addTime ();
157+ sfTimerManager::getTimer ('Database (Doctrine) ' , false )->addTime ();
158158
159159 $ args = func_get_args ();
160160 $ this ->__call (__FUNCTION__ , $ args );
You can’t perform that action at this time.
0 commit comments