r110323 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110322‎ | r110323 | r110324 >
Date:20:16, 30 January 2012
Author:nikerabbit
Status:ok
Tags:
Comment:
Added logging to get some sense how much stuff gets cleared and how often
Modified paths:
  • /trunk/extensions/Translate/utils/MessageGroupStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/MessageGroupStats.php
@@ -109,13 +109,16 @@
110110 );
111111
112112 $dbw->delete( self::TABLE, $conds, __METHOD__ );
 113+ wfDebugLog( 'messagegroupstats', "Cleared " . serialize( $conds ) );
113114 }
114115
115116 public static function clearGroup( $id ) {
 117+ wfDebugLog( 'messagegroupstats', "Cleared {$id}" );
116118 if ( !count( $id ) ) return;
117119 $dbw = wfGetDB( DB_MASTER );
118120 $conds = array( 'tgs_group' => $id );
119121 $dbw->delete( self::TABLE, $conds, __METHOD__ );
 122+ wfDebugLog( 'messagegroupstats', "Cleared " . serialize( $conds ) );
120123 }
121124
122125 public static function clearLanguage( $code ) {
@@ -123,6 +126,7 @@
124127 $dbw = wfGetDB( DB_MASTER );
125128 $conds = array( 'tgs_lang' => $code );
126129 $dbw->delete( self::TABLE, $conds, __METHOD__ );
 130+ wfDebugLog( 'messagegroupstats', "Cleared " . serialize( $conds ) );
127131 }
128132
129133 /**
@@ -131,6 +135,7 @@
132136 public static function clearAll() {
133137 $dbw = wfGetDB( DB_MASTER );
134138 $dbw->delete( self::TABLE, '*' );
 139+ wfDebugLog( 'messagegroupstats', "Cleared everything :(" );
135140 }
136141
137142 protected static function extractResults( $res, $stats = array() ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r110327Ping r110323, something extranikerabbit20:48, 30 January 2012

Status & tagging log