MessagePack\Tests\Perf\Writer\TableWriter::open PHP Метод

open() публичный Метод

public open ( array $benchmarkInfo, array $targets )
$benchmarkInfo array
$targets array
    public function open(array $benchmarkInfo, array $targets)
    {
        $this->widths = [self::COLUMN_WIDTH_FIRST];
        $cells = ['Test/Target'];
        foreach ($targets as $target) {
            $targetName = $target->getName();
            $this->widths[] = max(strlen($targetName) + 2, self::COLUMN_WIDTH_MIN);
            $cells[] = $targetName;
            $this->summary['total'][$targetName] = 0;
            $this->summary['skipped'][$targetName] = 0;
            $this->summary['failed'][$targetName] = 0;
            $this->summary['ignored'][$targetName] = 0;
        }
        $this->width = array_sum($this->widths);
        foreach ($benchmarkInfo as $title => $value) {
            echo "{$title}: {$value}\n";
        }
        echo "\n";
        echo str_repeat('=', $this->width) . "\n";
        $this->writeRow($cells);
        echo str_repeat('-', $this->width) . "\n";
    }