Stops measuring memory consumption
967800
def trace_memory_stop(self):
        

        self.trace_memory_clean_caches()

        objgraph.show_growth(limit=30)

        trace_type = context.get_current_config()["trace_memory_type"]
        if trace_type:

            filename = '%s/%s-%s.png' % (
                context.get_current_config()["trace_memory_output_dir"],
                trace_type,
                self.id)

            chain = objgraph.find_backref_chain(
                random.choice(
                    objgraph.by_type(trace_type)
                ),
                objgraph.is_proper_module
            )
            objgraph.show_chain(chain, filename=filename)
            del filename
            del chain

        gc.collect()
        self._memory_stop = self.worker.get_memory()["total"]

        diff = self._memory_stop - self._memory_start

        context.log.debug("Memory diff for job %s : %s" % (self.id, diff))

        # We need to update it later than the results, we need them off memory
        # already.
        self.collection.update(
            {"_id": self.id},
            {"$set": {
                "memory_diff": diff
            }},
            w=1
        )
1218937
public function stop() {
		$temp['section'] = $this->section;

		// set start value for system + user time
		if (function_exists('getrusage')) {
			$use = getrusage();
			$user   = sprintf('%6d.%06d', $use['ru_utime.tv_sec'], $use['ru_utime.tv_usec']);
			$system = sprintf('%6d.%06d', $use['ru_stime.tv_sec'], $use['ru_stime.tv_usec']);
			$proctime_end = $user+$system;
			$temp['proctime'] = $proctime_end - $this->proctime;
		} else {
			$temp['proctime'] = 'n/a';
		}

		$realtime_end = microtime(true);
		$temp['realtime'] = $realtime_end - $this->realtime;

		if (function_exists('memory_get_usage')) $temp['mem'] = memory_get_usage();
		else $temp['mem'] = 'n/a';

		$this->data[] = $temp;
		$this->active	= false;
	}
453968
private void stopResourceAdapter() {
        if (resourceAdapter != null)
            try {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    Tr.debug(this, tc, "stop", resourceAdapter);
                ArrayList<ThreadContext> threadContext = startTask(raThreadContextDescriptor);
                try {
                    beginContext(raMetaData);
                    try {
                        ClassLoader previousClassLoader = jcasu.beginContextClassLoader(raClassLoader);
                        try {
                            resourceAdapter.stop();
                        } finally {
                            if (raClassLoader != null) {
                                jcasu.endContextClassLoader(raClassLoader, previousClassLoader);
                                classLoadingSvc.destroyThreadContextClassLoader(raClassLoader);
                            }
                        }
                    } finally {
                        endContext(raMetaData);
                    }
                } finally {
                    stopTask(raThreadContextDescriptor, threadContext);
                }

                // Cancel timers
                for (Timer timer = timers.poll(); timer != null; timer = timers.poll()) {
                    timer.cancel();
                    timer.purge();
                }

                // Cancel/release work
                workManager.stop();
            } catch (Throwable x) {
                // auto FFDC
            } finally {
                // decrement the reference count
                BundleContext bundleContext = FrameworkUtil.getBundle(getClass()).getBundleContext();
                if (bundleContext != null) {
                    bundleContext.ungetService(contextSvcRef);
                }
            }
    }
219499
def stop_consuming(self):
        
        if self._channel:
            self._logger.info('Sending a Basic.Cancel RPC command to RabbitMQ')
            self._channel.basic_cancel(self.on_cancelok, self._consumer_tag)
749852
public void stop(long millisec) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Stopping (" + millisec + ") : " + this);
        }
        if (0 == millisec) {
            setState(STATE_STOPPED);
        } else {
            setState(STATE_STOPPING);
        }
    }
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;
  }
335178
def stop_trace(self, frame=None):
        """"""
        self.tracing = False
        self.full = False
        frame = frame or sys._getframe().f_back
        while frame:
            del frame.f_trace
            frame = frame.f_back
        sys.settrace(None)
        log.info('Stopping trace')
841186
def stop(self):
        """"""
        self._end.value = True
        if self.background_process:
            try:
                self.background_process.terminate()
            except Exception:
                pass
        for task_id, values in self.current_tasks.items():
            try:
                values['proc'].terminate()
            except Exception:
                pass
1026095
def stop(self):
        ''''''
        for key, value in self._configs.items():
            self._client.config_set(key, value)
        logs = self._client.execute_command('slowlog', 'get', 100000)
        current = {
            'name': None, 'accumulated': defaultdict(list)
        }
        for _, _, duration, request in logs:
            command = request[0]
            if command == 'slowlog':
                continue
            if 'eval' in command.lower():
                subcommand = request[3]
                self._timings['qless-%s' % subcommand].append(duration)
                if current['name']:
                    if current['name'] not in self._commands:
                        self._commands[current['name']] = defaultdict(list)
                    for key, values in current['accumulated'].items():
                        self._commands[current['name']][key].extend(values)
                current = {
                    'name': subcommand, 'accumulated': defaultdict(list)
                }
            else:
                self._timings[command].append(duration)
                if current['name']:
                    current['accumulated'][command].append(duration)
        # Include the last
        if current['name']:
            if current['name'] not in self._commands:
                self._commands[current['name']] = defaultdict(list)
            for key, values in current['accumulated'].items():
                self._commands[current['name']][key].extend(values)
1365999
function releaseMemoryObserver() {
  // Only disable on last use.
  if (!memoryObservationCount) {
    return;
  }
  --memoryObservationCount;
  if (memoryObservationCount) {
    return;
  }

  // Unlisten for events.
  Services.obs.removeObserver(
      handleMemoryEvent, 'garbage-collection-statistics', false);

  // Reset memory notification to its original state.
  resetTemporaryPreference('javascript.options.mem.notify');
}
1232263
def stop(self):
        """"""
        if not self._dead:
            self._killed = True
            self._cancelled.set()
            self._busy_sem.release()
            self.join()
            if not self._ready_sem.acquire(False):
                warning("ISOTP Timer thread may not have stopped "
                        "correctly")
234702
def stop(self):
        

        status = yield from self.get_status()
        if status != "inactive":
            try:
                yield from self._hypervisor.send('vm stop "{name}"'.format(name=self._name))
            except DynamipsError as e:
                log.warn("Could not stop {}: {}".format(self._name, e))
            self.status = "stopped"
            log.info('Router "{name}" [{id}] has been stopped'.format(name=self._name, id=self._id))
        if self._memory_watcher:
            self._memory_watcher.close()
            self._memory_watcher = None
        yield from self.save_configs()
571138
public void stop()
  {
    synchronized (startStopLock) {
      running = false;
      taskStatusChecker.shutdownNow();

      if (numRunningTasks > 0) {
        final Iterator<MonitorEntry> iterator = runningTasks.values().iterator();
        while (iterator.hasNext()) {
          final MonitorEntry entry = iterator.next();
          iterator.remove();
          final String taskId = entry.runningTask.getId();
          log.info("Request to kill subtask[%s]", taskId);
          indexingServiceClient.killTask(taskId);
          numRunningTasks--;
          numKilledTasks++;
        }

        if (numRunningTasks > 0) {
          log.warn(
              "Inconsistent state: numRunningTasks[%d] is still not zero after trying to kill all running tasks.",
              numRunningTasks
          );
        }
      }

      log.info("Stopped taskMonitor");
    }
  }
374034
def clear_stats(self):
        """"""
        self._start_time = None
        self._run_time = 0
        self.stats = {
            'Enabled': False,
            'Bind Address': lambda s: repr(self.bind_addr),
            'Run time': lambda s: (not s['Enabled']) and -1 or self.runtime(),
            'Accepts': 0,
            'Accepts/sec': lambda s: s['Accepts'] / self.runtime(),
            'Queue': lambda s: getattr(self.requests, 'qsize', None),
            'Threads': lambda s: len(getattr(self.requests, '_threads', [])),
            'Threads Idle': lambda s: getattr(self.requests, 'idle', None),
            'Socket Errors': 0,
            'Requests': lambda s: (not s['Enabled']) and -1 or sum(
                [w['Requests'](w) for w in s['Worker Threads'].values()], 0,
            ),
            'Bytes Read': lambda s: (not s['Enabled']) and -1 or sum(
                [w['Bytes Read'](w) for w in s['Worker Threads'].values()], 0,
            ),
            'Bytes Written': lambda s: (not s['Enabled']) and -1 or sum(
                [w['Bytes Written'](w) for w in s['Worker Threads'].values()],
                0,
            ),
            'Work Time': lambda s: (not s['Enabled']) and -1 or sum(
                [w['Work Time'](w) for w in s['Worker Threads'].values()], 0,
            ),
            'Read Throughput': lambda s: (not s['Enabled']) and -1 or sum(
                [w['Bytes Read'](w) / (w['Work Time'](w) or 1e-6)
                 for w in s['Worker Threads'].values()], 0,
            ),
            'Write Throughput': lambda s: (not s['Enabled']) and -1 or sum(
                [w['Bytes Written'](w) / (w['Work Time'](w) or 1e-6)
                 for w in s['Worker Threads'].values()], 0,
            ),
            'Worker Threads': {},
        }
        logging.statistics['Cheroot HTTPServer %d' % id(self)] = self.stats
475502
public void stop() {
        stopWrites();
        stopReads();
        if (timerRef != null && timerRef.get() != null) {
            timerRef.get().shutdownNow();
            timerRef.set(null);
        }
        ndBenchMonitor.resetStats();
    }
531001
def stop_capture(self):
        """"""
        super(Treal, self).stop_capture()
        if self._machine:
            self._machine.close()
        self._stopped()
809842
def stop(self):
        
        super(Icmpecho, self).stop()
        self.monitor_thread.join()
        logging.info("ICMPecho health monitor plugin: Stopped")