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

v0.3 2025-06-03 09:23 UTC

This package is auto-updated.

Last update: 2025-12-03 10:33:48 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.