Add test tool
This commit is contained in:
parent
10a4188eff
commit
9bbe004e96
22
dev/tools/test/testperf.php
Executable file
22
dev/tools/test/testperf.php
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$a = microtime(true);
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
while ($i < 1000000)
|
||||||
|
{
|
||||||
|
$key = '1234567890111213141516171819'.$i;
|
||||||
|
if ($i == 1000) $key = 'MAIN_MODULE_AAAAAiiiiiiiiiiiiiiiiiiiiiiiiiiiii';
|
||||||
|
|
||||||
|
//if (preg_match('/^MAIN_MODULE_/', $key)) {
|
||||||
|
if (strpos($key, 'MAIN_MODULE_') === 0) {
|
||||||
|
//if (substr($key, 0, 12) == 'MAIN_MODULE_') {
|
||||||
|
print "Found\n";
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$b = microtime(true);
|
||||||
|
|
||||||
|
print $b - $a."\n";
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user