fix tests
This commit is contained in:
parent
2bf838b8ba
commit
de40b4779c
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once 'color.php';
|
require_once 'color.php';
|
||||||
require_once __DIR__ . '/../src/Router.php';
|
require_once __DIR__ . '/../src/RouterInterface.php';
|
||||||
require_once __DIR__ . '/../src/SegmentRouter.php';
|
require_once __DIR__ . '/../src/SegmentRouter.php';
|
||||||
|
|
||||||
const ROUTES = __DIR__ . '/routes/';
|
const ROUTES = __DIR__ . '/routes/';
|
||||||
|
@ -22,7 +22,7 @@ $r = new SegmentRouter();
|
||||||
|
|
||||||
// Blog lookups
|
// Blog lookups
|
||||||
$blog = readAndAddRoutes(ROUTES . 'blog.txt', $r);
|
$blog = readAndAddRoutes(ROUTES . 'blog.txt', $r);
|
||||||
writeRoutesToFile($r->routes, TREES . 'blog.txt');
|
writeRoutesToFile($r->dump(), TREES . 'blog.txt');
|
||||||
echoTitle("Starting blog lookups");
|
echoTitle("Starting blog lookups");
|
||||||
runIterations(10000, $r, $blog);
|
runIterations(10000, $r, $blog);
|
||||||
runIterations(100000, $r, $blog);
|
runIterations(100000, $r, $blog);
|
||||||
|
@ -32,7 +32,7 @@ unset($blog);
|
||||||
// Github lookups
|
// Github lookups
|
||||||
$r->clear();
|
$r->clear();
|
||||||
$github = readAndAddRoutes(ROUTES . 'github.txt', $r);
|
$github = readAndAddRoutes(ROUTES . 'github.txt', $r);
|
||||||
writeRoutesToFile($r->routes, TREES . 'github.txt');
|
writeRoutesToFile($r->dump(), TREES . 'github.txt');
|
||||||
echoTitle("Starting github lookups");
|
echoTitle("Starting github lookups");
|
||||||
runIterations(10000, $r, $github);
|
runIterations(10000, $r, $github);
|
||||||
runIterations(100000, $r, $github);
|
runIterations(100000, $r, $github);
|
||||||
|
@ -42,7 +42,7 @@ unset($github);
|
||||||
// Big lookups
|
// Big lookups
|
||||||
$r->clear();
|
$r->clear();
|
||||||
$big = readAndAddRoutes(ROUTES . 'big.txt', $r);
|
$big = readAndAddRoutes(ROUTES . 'big.txt', $r);
|
||||||
writeRoutesToFile($r->routes, TREES . 'big.txt');
|
writeRoutesToFile($r->dump(), TREES . 'big.txt');
|
||||||
echoTitle("Starting big lookups");
|
echoTitle("Starting big lookups");
|
||||||
runIterations(10000, $r, $big);
|
runIterations(10000, $r, $big);
|
||||||
runIterations(100000, $r, $big);
|
runIterations(100000, $r, $big);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user