dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
98af136
)
Optionally use a different profile name for master queries
author
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 28 Mar 2006 05:11:40 +0000
(
05:11
+0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 28 Mar 2006 05:11:40 +0000
(
05:11
+0000)
includes/Database.php
patch
|
blob
|
history
diff --git
a/includes/Database.php
b/includes/Database.php
index
59817b2
..
138792d
100644
(file)
--- a/
includes/Database.php
+++ b/
includes/Database.php
@@
-367,10
+367,16
@@
class Database {
# Who's been wasting my precious column space? -- TS
#$profName = 'query: ' . $fname . ' ' . substr( Database::generalizeSQL( $sql ), 0, 255 );
# Who's been wasting my precious column space? -- TS
#$profName = 'query: ' . $fname . ' ' . substr( Database::generalizeSQL( $sql ), 0, 255 );
- $profName = 'query: ' . substr( Database::generalizeSQL( $sql ), 0, 255 );
- wfProfileIn( 'Database::query' );
- wfProfileIn( $profName );
+ if ( is_null( $this->getLBInfo( 'master' ) ) ) {
+ $queryProf = 'query: ' . substr( Database::generalizeSQL( $sql ), 0, 255 );
+ $totalProf = 'Database::query';
+ } else {
+ $queryProf = 'query-m: ' . substr( Database::generalizeSQL( $sql ), 0, 255 );
+ $totalProf = 'Database::query-master';
+ }
+ wfProfileIn( $totalProf );
+ wfProfileIn( $queryProf );
}
$this->mLastQuery = $sql;
}
$this->mLastQuery = $sql;
@@
-414,8
+420,8
@@
class Database {
}
if ( $wgProfiling ) {
}
if ( $wgProfiling ) {
- wfProfileOut( $
profName
);
- wfProfileOut(
'Database::query'
);
+ wfProfileOut( $
queryProf
);
+ wfProfileOut(
$totalProf
);
}
return $ret;
}
}
return $ret;
}