Go to the documentation of this file.
28 ini_set(
'zlib.output_compression',
'off' );
31 require __DIR__ .
'/includes/WebStart.php';
33 header(
'Content-Type: text/html; charset=utf-8' );
39 <meta charset=
"UTF-8">
52 font: 14px/1.6 sans-serif;
62 text-decoration: none;
66 text-decoration: underline;
81 background-
color: transparent;
82 border-collapse: collapse;
96 border-top: 1px solid #ddd;
104 vertical-align: bottom;
107 .table thead:first-child tr:first-child th,
108 .table thead:first-child tr:first-child td {
112 .table tbody + tbody {
113 border-top: 2px solid #ddd;
117 .table-condensed td {
121 .table-striped tbody tr:nth-child(odd) td,
122 .table-striped tbody tr:nth-child(odd) th {
123 background-
color: #f9f9f9;
126 .table-hover tbody tr:hover td,
127 .table-hover tbody tr:hover th {
128 background-
color: #f5f5f5;
134 border-top: 1px solid #eee;
135 border-bottom: 1px solid #fff;
143 echo
'<p>Disabled</p>'
150 if ( !
$dbr->tableExists(
'profiling' ) ) {
151 echo
'<p>No <code>profiling</code> table exists, so we can\'t show you anything.</p>'
152 .
'<p>If you want to log profiling data, enable <code>$wgProfileToDatabase</code>'
153 .
' in your LocalSettings.php and run <code>maintenance/update.php</code> to'
154 .
' create the profiling table.'
160 if ( isset( $_REQUEST[
'expand'] ) ) {
161 foreach ( explode(
',', $_REQUEST[
'expand'] )
as $f ) {
179 $this->children =
array();
183 $this->children[] = $child;
187 usort( $this->children,
'compare_point' );
191 $anchor = str_replace(
'"',
'', $this->
name() );
194 if (
count( $this->children ) ) {
196 $extet =
" <a id=\"{$anchor}\" href=\"{$url}#{$anchor}\">[+]</a>";
208 $extet =
" <a id=\"{$anchor}\" href=\"{$url}#{$anchor}\">[–]</a>";
213 <div style=
"margin-left: <?php echo (int)$indent; ?>em;">
214 <?
php echo htmlspecialchars( str_replace(
',',
', ', $this->
name() ) ) . $extet ?>
217 <td
class=
"mw-profileinfo-timep"><?
php echo @
wfPercent( $this->
time() / self::$totaltime * 100 ); ?></td>
218 <td
class=
"mw-profileinfo-memoryp"><?
php echo @
wfPercent( $this->
memory() / self::$totalmemory * 100 ); ?></td>
219 <td
class=
"mw-profileinfo-count"><?
php echo $this->
count(); ?></td>
220 <td
class=
"mw-profileinfo-cpr"><?
php echo round( sprintf(
'%.2f', $this->
callsPerRequest() ), 2 ); ?></td>
221 <td
class=
"mw-profileinfo-tpc"><?
php echo round( sprintf(
'%.2f', $this->
timePerCall() ), 2 ); ?></td>
222 <td
class=
"mw-profileinfo-mpc"><?
php echo round( sprintf(
'%.2f', $this->
memoryPerCall() / 1024 ), 2 ); ?></td>
223 <td
class=
"mw-profileinfo-tpr"><?
php echo @round( sprintf(
'%.2f', $this->
time() / self::$totalcount ), 2 ); ?></td>
224 <td
class=
"mw-profileinfo-mpr"><?
php echo @round( sprintf(
'%.2f', $this->
memory() / self::$totalcount / 1024 ), 2 ); ?></td>
228 foreach ( $this->children
as $child ) {
229 $child->display(
$expand, $indent + 2 );
247 return $this->memory;
271 return sprintf(
'%5.02f', $this->
time );
279 return strcmp( $a->
name(), $b->
name() );
281 return $a->
time() > $b->
time() ? -1 : 1;
286 case 'time_per_call':
288 case 'memory_per_call':
290 case 'calls_per_req':
294 case 'memory_per_req':
299 $sorts =
array(
'time',
'memory',
'count',
'calls_per_req',
'name',
300 'time_per_call',
'memory_per_call',
'time_per_req',
'memory_per_req' );
302 if ( isset( $_REQUEST[
'sort'] ) && in_array( $_REQUEST[
'sort'],
$sorts ) ) {
303 $sort = $_REQUEST[
'sort'];
306 $res =
$dbr->select(
'profiling',
'*',
array(),
'profileinfo.php',
array(
'ORDER BY' =>
'pf_name ASC' ) );
308 if ( isset( $_REQUEST[
'filter'] ) ) {
309 $filter = $_REQUEST[
'filter'];
317 <input
type=
"text" name=
"filter" value=
"<?php echo htmlspecialchars( $filter ); ?>">
318 <input
type=
"hidden" name=
"sort" value=
"<?php echo htmlspecialchars( $sort ); ?>">
319 <input
type=
"hidden" name=
"expand" value=
"<?php echo htmlspecialchars( implode( ",
", array_keys( $expand ) ) ); ?>">
320 <input
type=
"submit" value=
"Filter">
324 <
table class=
"mw-profileinfo-table table table-striped table-hover">
327 <th><a
href=
"<?php echo getEscapedProfileUrl( false, 'name' ); ?>">Name</a></th>
328 <th><a
href=
"<?php echo getEscapedProfileUrl( false, 'time' ); ?>">Time (%)</a></th>
329 <th><a
href=
"<?php echo getEscapedProfileUrl( false, 'memory' ); ?>">Memory (%)</a></th>
330 <th><a
href=
"<?php echo getEscapedProfileUrl( false, 'count' ); ?>">Count</a></th>
331 <th><a
href=
"<?php echo getEscapedProfileUrl( false, 'calls_per_req' ); ?>">Calls/req</a></th>
332 <th><a
href=
"<?php echo getEscapedProfileUrl( false, 'time_per_call' ); ?>">ms/call</a></th>
333 <th><a
href=
"<?php echo getEscapedProfileUrl( false, 'memory_per_call' ); ?>">kb/call</a></th>
334 <th><a
href=
"<?php echo getEscapedProfileUrl( false, 'time_per_req' ); ?>">ms/req</a></th>
335 <th><a
href=
"<?php echo getEscapedProfileUrl( false, 'memory_per_req' ); ?>">kb/req</a></th>
347 if ( $_expand ===
false ) {
351 return htmlspecialchars(
354 'filter' => $_filter ? $_filter : $filter,
355 'sort' => $_sort ? $_sort :
$sort,
356 'expand' => implode(
',', array_keys( $_expand ) )
367 $next =
new profile_point( $o->pf_name, $o->pf_count, $o->pf_time, $o->pf_memory );
368 if ( $next->name() ==
'-total' ) {
373 if (
$last !==
false ) {
374 if ( preg_match(
'/^' . preg_quote(
$last->name(),
'/' ) .
'/', $next->name() ) ) {
375 $last->add_child( $next );
380 if ( preg_match(
'/^query: /', $next->name() ) || preg_match(
'/^query-m: /', $next->name() ) ) {
394 usort(
$points,
'compare_point' );
397 if ( strlen( $filter ) && !strstr( $point->name(), $filter ) ) {
wfPercent( $nr, $acc=2, $round=true)
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of data
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
compare_point(profile_point $a, profile_point $b)
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
__construct( $name, $count, $time, $memory)
if(! $wgEnableProfileInfo) $dbr
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in memory
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those you will have to move or merge the page manually if desired</td >< td > be sure to &You are responsible for making sure that links continue to point where they are supposed to go Note that the page will &a page at the new title
if(! $dbr->tableExists( 'profiling')) $expand
display( $expand, $indent=0.0)
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global then executing the whole list after the page is displayed We don t do anything smart like collating updates to the same table or such because the list is almost always going to have just one item on if so it s not worth the trouble Since there is a job queue in the jobs table
getEscapedProfileUrl( $_filter=false, $_sort=false, $_expand=false)
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
null means default in associative array form
published in in Madrid In the first edition of the Vocabolario for was published In in Rotterdam was the Dictionnaire Universel ! html< p > The first monolingual dictionary written in a Romance language was< i > Sebastián Covarrubias</i >< i > Tesoro de la lengua castellana o published in in Madrid In the first edition of the< i > Vocabolario dell< a href="/index.php?title=Accademia_della_Crusca&action=edit&redlink=1" class="new" title="Accademia della Crusca (page does not exist)"> Accademia della Crusca</a ></i > for was published In in Rotterdam was the< i > Dictionnaire Universel</i ></p > ! end ! test Italics and bold
if(isset( $_REQUEST['sort']) &&in_array( $_REQUEST['sort'], $sorts)) $res
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres as and are nearing end of but without copying over all the usage comments General notes on the but these can almost always be programmed around *Although Postgres has a true BOOLEAN type
in the sidebar</td >< td > font color
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at name
and how to run hooks for an and one after Each event has a preferably in CamelCase For ArticleDelete hook A clump of code and data that should be run when an event happens This can be either a function and a chunk of or an object and a method hook function The function part of a third party developers and administrators to define code that will be run at certain points in the mainline code
wfArrayToCgi( $array1, $array2=null, $prefix='')
This function takes two arrays as input, and returns a CGI-style string, e.g.