1
0
Fork 0

tests(completion): add completion of new| ParameterBag to completion benchmark

pull/602/head
Declspeck 2018-02-03 23:25:53 +02:00
parent e589f9ee12
commit 6858bd3513
No known key found for this signature in database
GPG Key ID: F0417663122A2189
1 changed files with 9 additions and 3 deletions

View File

@ -65,11 +65,17 @@ foreach ($testProviderArray as $idx => $testCaseFile) {
echo "Getting completion". PHP_EOL; echo "Getting completion". PHP_EOL;
// Completion in $this->|request = new ParameterBag($request);
$start = microtime(true); $start = microtime(true);
$list = $completionProvider->provideCompletion($completionDocument, new Position(274, 15)); $list = $completionProvider->provideCompletion($completionDocument, new Position(274, 15));
$end = microtime(true); $end = microtime(true);
echo 'Time ($this->|): ' . ($end - $start) . 's' . PHP_EOL;
echo count($list->items) . ' completion items' . PHP_EOL; echo count($list->items) . ' completion items' . PHP_EOL;
echo "Time: " . ($end - $start) . 's' . PHP_EOL; // Completion in $this->request = new| ParameterBag($request);
// (this only finds ParameterBag though.)
$start = microtime(true);
$list = $completionProvider->provideCompletion($completionDocument, new Position(274, 28));
$end = microtime(true);
echo 'Time (new|): ' . ($end - $start) . 's' . PHP_EOL;
echo count($list->items) . ' completion items' . PHP_EOL;