protected function log_finish($message, $depth = 0) {
        $this->log($message, $depth);

        if (isset($this->tracestats->$depth)) {
            $startstats = $this->tracestats->$depth;
            $this->log(
                    sprintf("Time taken %s, memory total: %s, Memory growth: %s, Memory peak: %s",
                        microtime_diff($startstats['time'], microtime()),
                        display_size(memory_get_usage()),
                        display_size(memory_get_usage() - $startstats['mem']),
                        display_size(memory_get_peak_usage())
                    ),
                    $depth + 1
                );
        }
    }