Stops the profiling.

@param StopwatchEvent $event A stopwatchEvent instance
1192
protected function stopProfiling(StopwatchEvent $event = null)
    {
        if ($this->stopwatch instanceof Stopwatch) {
            $event->stop();

            $values = [
                'duration'    => $event->getDuration(),
                'memory_end'  => memory_get_usage(true),
                'memory_peak' => memory_get_peak_usage(true),
            ];

            $this->profiles[$this->counter] = array_merge($this->profiles[$this->counter], $values);

            $this->counter++;
        }
    }
131137
public function off(string $event): bool
    {
        if ($this->hasEvent($event)) {
            unset(self::$events[$event], self::$eventHandlers[$event]);

            return true;
        }

        return false;
    }
512181
public function forget($event)
    {
        if (mb_strpos($event, '*') !== false) {
            unset($this->wildcards[$event]);
        } else {
            unset($this->listeners[$event], $this->sorted[$event]);
        }
    }
48749
public function onBeforeRedirect(Event $event)
    {
        /**
         * @var Container $container
         * @var Collector $collector
         * @var Profiler  $profiler
         */
        $container = $event['app']->getContainer();
        $collector = $container->get('debugger.collector');
        $profiler  = $container->get('profiler');

        $collector['redirect'] = [
            'url' => $event['url'],
            'moved' => $event['moved'],
        ];
    }
941767
public function stop()
    {
        // Try to emit onWorkerStop callback.
        if ($this->onWorkerStop) {
            try {
                call_user_func($this->onWorkerStop, $this);
            } catch (\Exception $e) {
                self::log($e);
                exit(250);
            } catch (\Error $e) {
                self::log($e);
                exit(250);
            }
        }
        // Remove listener for server socket.
        if ($this->_mainSocket) {
            self::$globalEvent->del($this->_mainSocket, EventInterface::EV_READ);
            @fclose($this->_mainSocket);
        }
    }
914563
public function stop()
    {
        if ($this->isStarted()) {
            // trigger bbapplication.stop
            $this->getEventDispatcher()->dispatch('bbapplication.stop', new Event($this));
            $this->info('BackBee application ended');
        }
    }
807893
public function onReflectSuccess($event)
    {
        $filename = $event['file']->getPathname();
        $appEvent = $this->stopwatch->stop($filename);
        $time     = $appEvent->getDuration();

        self::$logger->info(
            'AST built in {time} on file "{file}"',
            array('time' => Timer::toTimeString($time), 'file' => $filename)
        );
    }
391260
public function onReflectError($event)
    {
        $filename = $event['file']->getPathname();
        $this->stopwatch->stop($filename);

        self::$logger->error(
            'Parse error in {time} on file "{file"}: {error}',
            array(
                'time'  => Timer::toTimeString($time),
                'file'  => $filename,
                'error' => $event['error']
            )
        );
    }
547995
public void stopMonitor() {
        logger.info("Stopping Directory Update Monitor");
        try {
            monitor.stop();
        } catch (IllegalStateException e) {
            logger.info("File alteration monitor is already stopped: " + e.getMessage());
        } catch (Exception e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
1281081
protected function endProfile($token)
    {
        if (isset($this->profileTokens[$token])) {
            $time = microtime(true) - $this->profileTokens[$token];

            unset($this->profileTokens[$token]);
        }
        else {
            $time = 0;
        }

        $this->log(" done (time: " . sprintf('%.3f', $time) . "s)\n");
    }
1149398
public function stop($key, $timetamp = null)
    {
        $event = new End($key, $timetamp);
        $this->dispatcher->dispatch(End::EVENT_NAME, $event);
    }
662491
private function stopTimeRegister()
    {
        if ($this->rTimer !== null)
        {
            $this->rTimer->cancel();
            $this->rTimer = null;
            $this->connectionPool->resetNow();
        }
    }
521814
@Handler(priority = -1000)
    public void onStop(Stop event) {
        if (closing || !serverSocketChannel.isOpen()) {
            return;
        }
        newSyncEventPipeline().fire(new Close(), this);
    }
1319763
public void stop() {
        this.eventManager.fireEvent(EventType.SERVER_STOPPING, new Event().attribute("blade", this));
        this.server.stopAndWait();
        this.eventManager.fireEvent(EventType.SERVER_STOPPED, new Event().attribute("blade", this));
    }
138888
public function onTerminate(ConsoleTerminateEvent $event)
    {
        $command = $event->getCommand();

        if (!$command instanceof CommandInterface) {
            return;
        }
        
        $stopwatch = $this->stopwatch->stop($command->getName());
        
        $io = new SymfonyStyle($event->getInput(), $event->getOutput());
        $io->listing([
            sprintf('Duration: %d s', $stopwatch->getDuration() / 1000),
            sprintf('Memory: %s', Converter::formatBytes($stopwatch->getMemory()))
        ]);
    }
393786
public function off($event)
    {
        if ($this->hasEvent($event)) {
            $handler = $this->eventHandlers[$event];

            unset($this->events[$event], $this->eventHandlers[$event]);

            return $handler;
        }

        return null;
    }
912517
public function stop()
  {
    if(!$this->isRunning()) return;

    $this->data["runtime"] += microtime(TRUE) - $this->started;
    $this->data["realmem"] += memory_get_usage(TRUE) - $this->data["realmem_start"];
    $this->data["emalloc"] += memory_get_usage() - $this->data["emalloc_start"];

    $this->started = 0;
    $this->running = FALSE;
  }