public function render()
    {
        $max_label_length = $this->max_label_length + 5;
        $dashes = str_repeat('-', $max_label_length + 39) . "\n";
        $margin = str_repeat(' ', 2);

        $header = sprintf(
            "%s %-{$max_label_length}s %-12s %-12s %s\n",
            $margin, 'label', 'time (ms)', 'perc', 'memory'
        );

        $body = '';
        foreach ($this->runs as $run) {
            $body .= sprintf(
                "%s %-{$max_label_length}s %-10s %6s %14s\n",
                $margin,
                $run->label,
                $run->time,
                number_format(($run->time * 100) / $this->total, 2, '.', ''),
                $run->memory
            );
        }
        return $header . $dashes . $body . $dashes;
    }