pieceofcodero / benchmark
Lightweight, fluent benchmarking for PHP
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/pieceofcodero/benchmark
README
A minimal, object-oriented benchmarking utility for measuring execution time of code blocks in PHP. Designed for profiling hot paths, repeated function calls, and rendering logic during development or runtime diagnostics.
-
๐ Measure execution time across multiple calls;
-
๐งฉ Scoped timing with
$benchmark->measure(fn() => ...); -
๐ Fluent API with method chaining:
$benchmark->stop()->getTotal(); -
๐ท๏ธ Label-based BenchmarkManager to organize multiple timers;
-
๐ซ No dependencies, zero config โ drop-in ready;
Perfect for performance tuning without reaching for full profilers like Xdebug or Blackfire.