embryonic profiling feature
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 18 Nov 2006 05:19:07 +0000 (05:19 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 18 Nov 2006 05:19:07 +0000 (05:19 +0000)
maintenance/dumpHTML.php

index 12b6fc2..2c0c29c 100644 (file)
  * --interlang          allow interlanguage links
  * --image-snapshot     copy all images used to the destination directory
  * --compress           generate compressed version of the html pages
+ * --udp-profile <N>    profile 1/N rendering operations using ProfilerSimpleUDP
  */
 
 
-$optionsWithArgs = array( 's', 'd', 'e', 'k', 'checkpoint', 'slice' );
+$optionsWithArgs = array( 's', 'd', 'e', 'k', 'checkpoint', 'slice', 'udp-profile' );
 
 $profiling = false;
 
@@ -43,6 +44,10 @@ if ( $profiling ) {
        }
 }
 
+if ( in_array( '--udp-profile', $argv ) ) {
+       define( 'MW_FORCE_PROFILE', 1 );
+}
+
 require_once( "commandLine.inc" );
 require_once( "dumpHTML.inc" );
 
@@ -96,6 +101,7 @@ $wgHTMLDump = new DumpHTML( array(
        'noOverwrite' => $options['no-overwrite'],
        'compress' => $options['compress'],
        'noSharedDesc' => $options['no-shared-desc'],
+       'udpProfile' => $options['udp-profile'],
 ));