PhpBench\Progress\Logger\HistogramLogger::drawIterations PHP Method

drawIterations() private method

private drawIterations ( Variant $variant )
$variant PhpBench\Model\Variant
    private function drawIterations(Variant $variant)
    {
        $subject = $variant->getSubject();
        $this->output->write("");
        // clear the whole line
        $this->output->write(PHP_EOL);
        $this->output->write("");
        // clear the whole line
        $this->output->write("");
        $sigma = 2;
        $bins = 16;
        if ($variant->isComputed()) {
            $times = $variant->getMetricValues(ComputedResult::class, 'z_value');
            $stats = $variant->getStats();
            $freqs = Statistics::histogram($times, $bins, -$sigma, $sigma);
        } else {
            $stats = new Distribution([0]);
            $freqs = array_fill(0, $bins + 1, null);
        }
        $this->output->write(sprintf('#%-2d (σ = %s ) -%sσ [', $subject->getIndex(), $this->timeUnit->format($stats->getStdev()), $sigma));
        $this->drawBlocks($freqs, $stats);
        $this->output->write(sprintf('] +%sσ <comment>%s</comment>', $sigma, $variant->isComputed() ? $this->formatIterationsShortSummary($variant) : ''));
        $this->output->write(PHP_EOL);
    }