PhpBench\Storage\Driver\Xml\HistoryIterator::getHistoryEntry PHP Method

getHistoryEntry() private method

The summary *should* used pre-calculated values from the XML therefore reducing the normal overhead, however this code is still quite expensive as we are creating the entire object graph for each suite run.
private getHistoryEntry ( string $path ) : HistoryEntry
$path string
return PhpBench\Storage\HistoryEntry
    private function getHistoryEntry($path)
    {
        $dom = new Document();
        $dom->load($path);
        $collection = $this->xmlDecoder->decode($dom);
        $suites = $collection->getSuites();
        $suite = reset($suites);
        $envInformations = $suite->getEnvInformations();
        $vcsBranch = null;
        if (isset($envInformations['vcs']['branch'])) {
            $vcsBranch = $envInformations['vcs']['branch'];
        }
        $summary = $suite->getSummary();
        $entry = new HistoryEntry($suite->getUuid(), $suite->getDate(), $suite->getContextName(), $vcsBranch, $summary->getNbSubjects(), $summary->getNbIterations(), $summary->getNbRevolutions(), $summary->getMinTime(), $summary->getMaxTime(), $summary->getMeanTime(), $summary->getMeanRelStDev(), $summary->getTotalTime());
        return $entry;
    }