PHP Interface PhpBench\Model\ResultInterface

Implementations should reflect a particular domain of information, e.g. time, memory, xdebug..
Datei anzeigen Open project: dantleech/phpbench

Public Methods

Method Description
fromArray ( array $values ) : PhpBench\Model\ResultInterface Return a new instance based using the given array values.
getKey ( ) : string Return a short key which should represent this result, f.e. time.
getMetrics ( ) Return a key value set representing the metrics in this result.

Method Details

fromArray() public static method

Return a new instance based using the given array values.
public static fromArray ( array $values ) : PhpBench\Model\ResultInterface
$values array
return PhpBench\Model\ResultInterface

getKey() public method

This key must be unique in the set of all result classes.
public getKey ( ) : string
return string

getMetrics() public method

This set will be used to serialize the results, f.e. as attributes in an XML element. [ 'stat_1' => 1234, 'stat_2' => 5678, ] If the key of this result is "foo" then the set might be serialized as:
public getMetrics ( )