Composable performance sampling framework.
use PhpBench\Pipeline\Core\PipelineBuilder;
$builder = PipelineBuilder::createWithDefaults()
->stage('parameter/serial', [
'name' => 'algo',
'values' => hash_algos(),
])
->stage('sampler/callable', [
'callable' => function ($data) { hash($data['algo'], 'Hello World'); },
'iterations' => 100,
])
->stage('encoder/json')
->stage('output/stream')
->build()
->run();