protected function startProfiling($name, $query, $source = null, $target = null)
    {
        if ($this->stopwatch instanceof Stopwatch) {
            $this->profiles[$this->counter] = [
                'query'        => urldecode($query),
                'source'       => $source,
                'target'       => $target,
                'duration'     => null,
                'memory_start' => memory_get_usage(true),
                'memory_end'   => null,
                'memory_peak'  => null,
            ];

            return $this->stopwatch->start($name);
        }
    }