pieceofcodero / benchmark
Lightweight, fluent benchmarking for PHP
v0.3
2025-06-03 09:23 UTC
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.