diff options
author | Michael Hamann <michael@content-space.de> | 2010-10-10 14:26:22 +0200 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2010-10-10 14:26:22 +0200 |
commit | 762b4c44c691f69d521413d7016314e7f547c102 (patch) | |
tree | 95ab294b1df2f8c7a5efb56762a0f284bec3754e /_test/cases/inc/indexer_idx_indexlengths.test.php | |
parent | eae17177de8f3f3580af5ea66d126aee0f23227f (diff) | |
parent | 4ea48b361401e136dbfd3339af368ceeb5b27480 (diff) | |
download | rpg-762b4c44c691f69d521413d7016314e7f547c102.tar.gz rpg-762b4c44c691f69d521413d7016314e7f547c102.tar.bz2 |
Merge remote branch 'origin/master' into sitemap
Diffstat (limited to '_test/cases/inc/indexer_idx_indexlengths.test.php')
-rw-r--r-- | _test/cases/inc/indexer_idx_indexlengths.test.php | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/_test/cases/inc/indexer_idx_indexlengths.test.php b/_test/cases/inc/indexer_idx_indexlengths.test.php index d1339a111..8565639be 100644 --- a/_test/cases/inc/indexer_idx_indexlengths.test.php +++ b/_test/cases/inc/indexer_idx_indexlengths.test.php @@ -56,66 +56,5 @@ class indexer_idx_indexlengths_test extends UnitTestCase { } } -class indexer_idx_indexlengths_time extends UnitTestCase { - - /** - * Test the time improvments of the new function - * Time reference for 10000 call oneWords: 4,6s - * It's 90% faster - */ - function test_oneWord(){ - global $conf; - $filter[8] = array('dokuwiki'); - $start = microtime(true); - for ($i = 0; $i < 10000; $i++) { - $result = idx_indexLengths(&$filter); - } - $end = microtime(true); - $time = $end - $start; - $timeref = 4.6*0.10; // actual execution time of 4,6s for 10000 calls - echo "1) 10% ref : $timeref -> $time \n"; - $this->assertTrue($time < $timeref); - } - - /** - * Test the time improvments of the new function - * Time reference for 10000 call moreWords: 4,6s - * It's 90% faster - */ - function test_moreWords() { - global $conf; - $filter = array( 4 => array('test'), 8 => array('dokuwiki'), 7 => array('powered')); - // more words should return the indexes - $start = microtime(true); - for ($i = 0; $i < 10000; $i++) { - $result = idx_indexLengths(&$filter); - } - $end = microtime(true); - $time = $end - $start; - $timeref = 4.6*0.10; // actual execution time of 4,6s for 10000 calls - echo "2) 10% ref : $timeref -> $time \n"; - $this->assertTrue($time < $timeref); - } - - /** - * Test the time improvments of the new function - * Time reference for 10000 call on minValue: 4,9s - * Sould be at least 65% faster - * Test fail with no cache - */ - function test_minValue() { - global $conf; - $filter = 5; - $start = microtime(true); - for ($i = 0; $i < 10000; $i++) { - $result = idx_indexLengths(&$filter); - } - $end = microtime(true); - $time = $end - $start; - $timeref = 4.9 * 0.35; // actual execution time of 4,9s for 10000 calls - echo "3) 35% ref : $timeref -> $time \n"; - $this->assertTrue($time < $timeref); - } -} //Setup VIM: ex: et ts=4 enc=utf-8 : |