Twig icon indicating copy to clipboard operation
Twig copied to clipboard

Feature Request: Twig\Profiler\Profile should have getStartTime() and getEndTime() methods

Open mahagr opened this issue 5 years ago • 0 comments

I'm trying to create Twig timeline into Clockwork, but right now there is no way to access the start and end timestamps in the profiler.

In the timeline it is useful to see when the template was called as it gives visual clues about the call order.

Something like:

    public function getStartTime()
    {
        return isset($this->starts['wt']) ? $this->starts['wt']] : 0;
    }

    public function getEndTime()
    {
        return isset($this->ends['wt']) ? $this->ends['wt']] : 0;
    }

mahagr avatar Oct 29 '20 12:10 mahagr