dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "registration: Only allow one extension to set a specific config setting"
[lhc/web/wiklou.git]
/
maintenance
/
storage
/
testCompression.php
diff --git
a/maintenance/storage/testCompression.php
b/maintenance/storage/testCompression.php
index
58644c2
..
deb2ca6
100644
(file)
--- a/
maintenance/storage/testCompression.php
+++ b/
maintenance/storage/testCompression.php
@@
-30,10
+30,11
@@
if ( !isset( $args[0] ) ) {
exit( 1 );
}
exit( 1 );
}
+$lang = Language::factory( 'en' );
$title = Title::newFromText( $args[0] );
if ( isset( $options['start'] ) ) {
$start = wfTimestamp( TS_MW, strtotime( $options['start'] ) );
$title = Title::newFromText( $args[0] );
if ( isset( $options['start'] ) ) {
$start = wfTimestamp( TS_MW, strtotime( $options['start'] ) );
- echo "Starting from " . $
wgL
ang->timeanddate( $start ) . "\n";
+ echo "Starting from " . $
l
ang->timeanddate( $start ) . "\n";
} else {
$start = '19700101000000';
}
} else {
$start = '19700101000000';
}
@@
-46,10
+47,14
@@
if ( isset( $options['limit'] ) ) {
}
$type = isset( $options['type'] ) ? $options['type'] : 'ConcatenatedGzipHistoryBlob';
}
$type = isset( $options['type'] ) ? $options['type'] : 'ConcatenatedGzipHistoryBlob';
-$dbr = $this->getDB( DB_
SLAVE
);
+$dbr = $this->getDB( DB_
REPLICA
);
$res = $dbr->select(
[ 'page', 'revision', 'text' ],
$res = $dbr->select(
[ 'page', 'revision', 'text' ],
- '*',
+ array_merge(
+ Revision::selectFields(),
+ Revision::selectPageFields(),
+ Revision::selectTextFields()
+ ),
[
'page_namespace' => $title->getNamespace(),
'page_title' => $title->getDBkey(),
[
'page_namespace' => $title->getNamespace(),
'page_title' => $title->getDBkey(),
@@
-83,7
+88,7
@@
printf( "%s\nCompression ratio for %d revisions: %5.2f, %s -> %d\n",
$type,
count( $hashes ),
$uncompressedSize / strlen( $serialized ),
$type,
count( $hashes ),
$uncompressedSize / strlen( $serialized ),
- $
wgL
ang->formatSize( $uncompressedSize ),
+ $
l
ang->formatSize( $uncompressedSize ),
strlen( $serialized )
);
printf( "Compression time: %5.2f ms\n", $t * 1000 );
strlen( $serialized )
);
printf( "Compression time: %5.2f ms\n", $t * 1000 );