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
API: Give block details along with errors
[lhc/web/wiklou.git]
/
maintenance
/
mctest.php
diff --git
a/maintenance/mctest.php
b/maintenance/mctest.php
index
da49e55
..
a97d2e1
100644
(file)
--- a/
maintenance/mctest.php
+++ b/
maintenance/mctest.php
@@
-78,7
+78,7
@@
class McTest extends Maintenance {
$set = 0;
$incr = 0;
$get = 0;
$set = 0;
$incr = 0;
$get = 0;
- $time_start =
$this->microtime_float(
);
+ $time_start =
microtime( true
);
for ( $i = 1; $i <= $iterations; $i++ ) {
if ( $mcc->set( "test$i", $i ) ) {
$set++;
for ( $i = 1; $i <= $iterations; $i++ ) {
if ( $mcc->set( "test$i", $i ) ) {
$set++;
@@
-95,21
+95,11
@@
class McTest extends Maintenance {
$get++;
}
}
$get++;
}
}
- $exectime =
$this->microtime_float(
) - $time_start;
+ $exectime =
microtime( true
) - $time_start;
$this->output( " set: $set incr: $incr get: $get time: $exectime", $server );
}
}
$this->output( " set: $set incr: $incr get: $get time: $exectime", $server );
}
}
-
- /**
- * Return microtime() as a float
- * @return float
- */
- private function microtime_float() {
- list( $usec, $sec ) = explode( " ", microtime() );
-
- return ( (float)$usec + (float)$sec );
- }
}
$maintClass = "McTest";
}
$maintClass = "McTest";