Page MenuHomePhabricator
Paste P43267

excimer2trace.php
ActivePublic

Authored by Krinkle on Mon, Jan 23, 10:25 PM.
Tags
None
Referenced Files
F36455967: excimer2trace.php
Mon, Jan 23, 10:25 PM
F36455965: excimer2trace.php
Mon, Jan 23, 10:25 PM
Subscribers
None
<?php
$profiler = new ExcimerProfiler;
$profiler->setPeriod( 0.001 ); // every 1ms
$profiler->setEventType( EXCIMER_CPU );
$profiler->start();
register_shutdown_function( function () use ( $profiler ) {
$profiler->stop();
file_put_contents('trace.log', $profiler->getLog()->formatCollapsed() );
} );
/*
KrinkleMac in ~/Development/less.php
$ docker run -it --rm --entrypoint /bin/bash --volume $PWD:$PWD docker-registry.wikimedia.org/releng/php81:0.2.0
nobody:/less.php# php -d auto_prepend_file=excimer2trace.php bin/lessc test/Fixtures/bootstrap-3.2/less/bootstrap.less out.css
Drag and drop trace.log into <https://www.speedscope.app/>, click "Left Heavy".
*/

Event Timeline

Krinkle edited the content of this paste. (Show Details)