Index: trunk/extensions/DumpHTML/dumpHTML.php |
— | — | @@ -28,12 +28,14 @@ |
29 | 29 | --image-snapshot copy all images used to the destination directory |
30 | 30 | --compress generate compressed version of the html pages |
31 | 31 | --udp-profile <N> profile 1/N rendering operations using ProfilerSimpleUDP |
| 32 | + --oom-adj <N> set /proc/<pid>/oom_adj |
| 33 | + --show-titles write each article title to stdout |
32 | 34 | |
33 | 35 | ENDS; |
34 | 36 | |
35 | 37 | define( 'MW_HTML_FOR_DUMP', 1 ); |
36 | 38 | |
37 | | -$optionsWithArgs = array( 's', 'd', 'e', 'k', 'checkpoint', 'slice', 'udp-profile' ); |
| 39 | +$optionsWithArgs = array( 's', 'd', 'e', 'k', 'checkpoint', 'slice', 'udp-profile', 'oom-adj' ); |
38 | 40 | $options = array( 'help' ); |
39 | 41 | $profiling = false; |
40 | 42 | |
— | — | @@ -68,6 +70,12 @@ |
69 | 71 | exit; |
70 | 72 | } |
71 | 73 | |
| 74 | +if ( !wfIsWindows() && isset( $options['oom-adj'] ) ) { |
| 75 | + $adj = intval( $options['oom-adj'] ); |
| 76 | + $pid = getmypid(); |
| 77 | + file_put_contents( "/proc/$pid/oom_adj", $adj ); |
| 78 | +} |
| 79 | + |
72 | 80 | if ( !empty( $options['s'] ) ) { |
73 | 81 | $start = $options['s']; |
74 | 82 | } else { |
— | — | @@ -117,6 +125,7 @@ |
118 | 126 | 'compress' => $options['compress'], |
119 | 127 | 'noSharedDesc' => $options['no-shared-desc'], |
120 | 128 | 'udpProfile' => $options['udp-profile'], |
| 129 | + 'showTitles' => $options['show-titles'], |
121 | 130 | )); |
122 | 131 | |
123 | 132 | $wgHTMLDump->setupDestDir(); |