You are here

public function MarkdownParserBenchmarkTrait::benchmarkParse in Markdown 3.0.x

Return value

\Drupal\markdown\MarkdownBenchmark

See also

\Drupal\markdown\Plugin\Markdown\MarkdownParserBenchmarkInterface::benchmarkParse()

1 call to MarkdownParserBenchmarkTrait::benchmarkParse()
MarkdownParserBenchmarkTrait::benchmark in src/Traits/MarkdownParserBenchmarkTrait.php

File

src/Traits/MarkdownParserBenchmarkTrait.php, line 57

Class

MarkdownParserBenchmarkTrait

Namespace

Drupal\markdown\Traits

Code

public function benchmarkParse($markdown) {
  $start = microtime(TRUE);
  $result = $this
    ->convertToHtml($markdown);
  $end = microtime(TRUE);
  return MarkdownBenchmark::create('parsed', $start, $end, static::$benchmark = $result);
}