update v 1.0.7.5

This commit is contained in:
Sujit Prasad
2016-06-13 20:41:55 +05:30
parent aa9786d829
commit 283d97e3ea
5078 changed files with 339851 additions and 175995 deletions

View File

@@ -0,0 +1,21 @@
<?php
require_once '../vendor/autoload.php';
use MaxMind\Db\Reader;
$reader = new Reader('GeoIP2-City.mmdb');
$count = 10000;
$startTime = microtime(true);
for ($i = 0; $i < $count; $i++) {
$ip = long2ip(rand(0, pow(2, 32) -1));
$t = $reader->get($ip);
if ($i % 1000 == 0) {
print($i . ' ' . $ip . "\n");
// print_r($t);
}
}
$endTime = microtime(true);
$duration = $endTime - $startTime;
print('Requests per second: ' . $count / $duration . "\n");