Benchmarking InterMix#
InterMix ships with a phpbench benchmark suite at:
benchmarks/IntermixBench.php
Run via Composer:
composer benchmark
Other useful variants:
composer bench:quick
composer bench:chart
What it measures#
The suite covers DI paths end-to-end:
Singleton
get()hot-path throughputTransient object graph creation via
make()Closure invocation through container DI
Class-method invocation via
registerMethod()+make(..., method)Property wiring via
registerProperty()+make()Immediate resolution via
resolveNow()(class and method paths)Scoped lifetime behavior with
enterScope()/leaveScope()Tagged service lookup via
findByTag()Invokerwrapper method invocation pathService-provider registration path
Environment-conditional interface binding path
Manual object graph baseline (non-container)
Output columns#
benchmark: benchmark class namesubject: measured scenario methodrevs: revolutions per iterationits: number of iterationsmem_peak: peak memory in the measured processmode: modal execution time for the subjectrstdev: relative standard deviation