shamanzpua / profiler
There is no license information available for the latest version (1.3) of this package.
Code profiler
1.3
2021-12-11 09:16 UTC
Requires
- php: >=7.0.0
This package is auto-updated.
Last update: 2026-03-11 18:45:34 UTC
README
<?php
require_once 'vendor/autoload.php';
use shamanzpua\Profiler\Profiler;
use shamanzpua\Profiler\LogStorages\FileStorage;
$logsPath = "/data/project/logs/profiler/";
Profiler::getInstance()->setLogStorage(new FileStorage($logsPath);
/**
* Set 2 seconds logs threshold
*/
Profiler::getInstance()->setLogDurationThreshold(2000);
performance_profiling_start("PROFILER_LOG_NAME");
profiler_breakpoint("POINT1");
profiler_breakpoint("POINT2");
performance_profiling_stop('POINT3');