OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- $Id$
-->
<html>
<head>
<body>
<?php
-$wgDBadminuser = $wgDBadminpassword = $wgDBserver = $wgDBname = false;
+$wgDBadminuser = $wgDBadminpassword = $wgDBserver = $wgDBname = $wgEnableProfileInfo = false;
-define("MEDIAWIKI", 1);
-
-require_once("./includes/Defines.php");
-require_once("./LocalSettings.php");
+define( 'MW_NO_SETUP', 1 );
+require_once( './includes/WebStart.php' );
require_once("./AdminSettings.php");
-if (!$wgEnableProfileInfo)
- die("disabled");
+if (!$wgEnableProfileInfo) {
+ echo "disabled\n";
+ exit( 1 );
+}
foreach (array("wgDBadminuser", "wgDBadminpassword", "wgDBserver", "wgDBname") as $var)
- if ($$var === false)
- die("AdminSettings.php not correct");
+ if ($$var === false) {
+ echo "AdminSettings.php not correct\n";
+ exit( 1 );
+ }
+
$expand = array();
if (isset($_REQUEST['expand']))
}
$points = array();
+$queries = array();
+$sqltotal = 0.0;
$last = false;
while (($o = mysql_fetch_object($res)) !== false) {
}
}
$last = $next;
- $points[] = $next;
+ if (preg_match("/^query: /", $next->name())) {
+ $sqltotal += $next->time();
+ $queries[] = $next;
+ } else {
+ $points[] = $next;
+ }
}
+$s = new profile_point("SQL Queries", 0, $sqltotal);
+foreach ($queries as $q)
+ $s->add_child($q);
+$points[] = $s;
+
usort($points, "compare_point");
foreach ($points as $point) {
?>
</body>
-</html:
+</html>