public function PerformanceTest::testPhpParserPerformanceWithoutShortCut

@group performance

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/PerformanceTest.php, line 154

Class

PerformanceTest

Namespace

Doctrine\Tests\Common\Annotations

Code

public function testPhpParserPerformanceWithoutShortCut() {
  $class = new \ReflectionClass('SingleClassLOC1000');
  $time = microtime(true);
  for ($i = 0, $c = 500; $i < $c; $i++) {
    $parser = new PhpParser();
    $parser
      ->parseClass($class);
  }
  $time = microtime(true) - $time;
  $this
    ->printResults('doc-parser-without-short-cut', $time, $c);
}