Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 641 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 641 Bytes

PHPBench Pipeline

Build Status

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();