From 6858bd3513f8dba28eaf6c65e1b3be4d56a73d64 Mon Sep 17 00:00:00 2001 From: Declspeck Date: Sat, 3 Feb 2018 23:25:53 +0200 Subject: [PATCH] tests(completion): add completion of new| ParameterBag to completion benchmark --- benchmarks/completion.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/benchmarks/completion.php b/benchmarks/completion.php index b02d723..7cc86dd 100644 --- a/benchmarks/completion.php +++ b/benchmarks/completion.php @@ -65,11 +65,17 @@ foreach ($testProviderArray as $idx => $testCaseFile) { echo "Getting completion". PHP_EOL; +// Completion in $this->|request = new ParameterBag($request); $start = microtime(true); $list = $completionProvider->provideCompletion($completionDocument, new Position(274, 15)); $end = microtime(true); - +echo 'Time ($this->|): ' . ($end - $start) . 's' . 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;