shamanzpua / profiler
Code profiler
Installs: 7 478
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.0.0
This package is auto-updated.
Last update: 2025-03-11 16:25:36 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');