function BlackfireDumper::dump
File
-
vendor/
twig/ twig/ src/ Profiler/ Dumper/ BlackfireDumper.php, line 21
Class
- BlackfireDumper
- @author Fabien Potencier <fabien@symfony.com>
Namespace
Twig\Profiler\DumperCode
public function dump(Profile $profile) : string {
$data = [];
$this->dumpProfile('main()', $profile, $data);
$this->dumpChildren('main()', $profile, $data);
$start = \sprintf('%f', microtime(true));
$str = <<<EOF
file-format: BlackfireProbe
cost-dimensions: wt mu pmu
request-start: {<span class="php-variable">$start</span>}
EOF;
foreach ($data as $name => $values) {
$str .= "{$name}//{$values['ct']} {$values['wt']} {$values['mu']} {$values['pmu']}\n";
}
return $str;
}