Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BRIC
dokuwiki
Commits
c1e6807d
Commit
c1e6807d
authored
14 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
removed outdated timing tests
parent
cf1b22ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_test/cases/inc/indexer_idx_indexlengths.test.php
+0
-61
0 additions, 61 deletions
_test/cases/inc/indexer_idx_indexlengths.test.php
with
0 additions
and
61 deletions
_test/cases/inc/indexer_idx_indexlengths.test.php
+
0
−
61
View file @
c1e6807d
...
...
@@ -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 :
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment