Report Renderers¶
Reports are rendered to an output medium using classes
implementing the PhpBench\Report\RendererInterface.
The configuration for a renderer is known here as an output. The user may define new outputs either in the configuration file or on the CLI. The renderer may also supply default outputs.
console¶
Renders directly to the console.
Options:
- table_style:
Type(s):
[null, scalar], Default:NULLThis is option does nothing and will be removed in PHPBench 2.0
delimited¶
The delimited renderer outputs the report as a delimited value list (for example a tab separated list of values). Such data can be easily imported into applications such as GNUPlot.
Options:
- delimiter:
Type(s):
string, Default: `` ``- file:
Type(s):
[null, string], Default:NULL- header:
Type(s):
bool, Default:true
json¶
Outputs reports (or rather the _tables_ in reports) as JSON records.
html¶
Render the report to a HTML document.
Options:
- title:
Type(s):
string, Default:PHPBench ReportTitle of document
- path:
Type(s):
string, Default:.phpbench/html/index.htmlPath to output document
Given the following configuration:
{
"report.outputs": {
"build-artifact": {
"renderer": "html",
"path": "path/to/something.html",
"title": "All Your Benchmark Are Belong to Us"
}
}
}
When we run PHPBench with the configured report above:
phpbench run --report=aggregate --executor=debug --output=build-artifact NothingBench.php
Then it will generate a HTML report to the configured path with the given title:
Written report to: /path/to/tests/Workspace/path/to/something.html