getPerformanceData example

/** * Child classes should implement this to return the timeline data * formatted for correct usage. */
    protected function formatTimelineData(): array
    {
        $this->initViewer();

        $data = [];

        $rows = $this->viewer->getPerformanceData();

        foreach ($rows as $info) {
            $data[] = [
                'name'      => 'View: ' . $info['view'],
                'component' => 'Views',
                'start'     => $info['start'],
                'duration'  => $info['end'] - $info['start'],
            ];
        }

        return $data;
    }
Home | Imprint | This part of the site doesn't use cookies.