static public function stop()
    {
        $sample = self::$sample;

        self::$sample = null;

        if (!$sample instanceof XhprofSample) {
            throw new \RuntimeException('The profiler has not been started');
        }

        $sample->setData(xhprof_disable());

        return $sample;
    }