HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/inzigd.komma.pro/vendor/phpbench/phpbench/lib/Model/ResultInterface.php
<?php

/*
 * This file is part of the PHPBench package
 *
 * (c) Daniel Leech <daniel@dantleech.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 */

namespace PhpBench\Model;

/**
 * Marker interface for iteration results.
 *
 * Implementations should reflect a particular domain of information, e.g.
 * time, memory, xdebug..
 */
interface ResultInterface
{
    /**
     * Return a new instance based using the given array values.
     *
     * @param array $values
     *
     * @return ResultInterface
     */
    public static function fromArray(array $values);

    /**
     * Return a key value set representing the metrics in this result.
     *
     * 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:
     *
     * ```
     * <iteration foo-stat-1="1234" foo-stat-2="5678"/>
     * ```
     *
     * @retrun array
     */
    public function getMetrics();

    /**
     * Return a short key which should represent this result, f.e. `time`.
     * This key must be unique in the set of all result classes.
     *
     * @return string
     */
    public function getKey();
}