summaryrefslogtreecommitdiff
path: root/_test/cases
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2010-10-03 13:21:15 +0200
committerAndreas Gohr <andi@splitbrain.org>2010-10-03 13:21:15 +0200
commitc1e6807d8013592efafd00472f75ea08dc7347ec (patch)
tree37b75aab8bf88ad11745c8abe37ec6ebb8d68e8c /_test/cases
parentcf1b22acfe590acea76aa3f0bd4421515d3d04d9 (diff)
downloadrpg-c1e6807d8013592efafd00472f75ea08dc7347ec.tar.gz
rpg-c1e6807d8013592efafd00472f75ea08dc7347ec.tar.bz2
removed outdated timing tests
Diffstat (limited to '_test/cases')
-rw-r--r--_test/cases/inc/indexer_idx_indexlengths.test.php61
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 :