def __init__(self, process_name, process, counters, childProcess="plugin-container"): CounterManager.__init__(self) self.childProcess = childProcess self.registeredCounters = {} self.registerCounters(counters) # PDH might need to be "refreshed" if it has been queried while the # browser is closed pdh.PdhEnumObjectsA(None, None, 0, 1, 0, True) for counter in self.registeredCounters: try: # Add the counter path for the default process. self._addCounter(process_name, 'process', counter) except TalosError: # Assume that this is a memory counter for the system, # not a process counter # If we got an error that has nothing to do with that, # the exception will almost certainly be re-raised self._addCounter(process_name, 'Memory', counter) self._updateCounterPathsForChildProcesses(counter)
def __init__(self, process_name, process, counters): """Args: counters: A list of counters to monitor. Any counters whose name does not match a key in 'counterDict' will be ignored. """ CounterManager.__init__(self) self.process = process self._loadCounters() self.registerCounters(counters)
def __init__(self, ffprocess, process, counters=None): """Args: counters: A list of counters to monitor. Any counters whose name does not match a key in 'counterDict' will be ignored. """ CounterManager.__init__(self, ffprocess, process, counters) # the last process is the useful one self.pid = self.ffprocess._GetPidsByName(process)[-1] self._loadCounters() self.registerCounters(counters)
def __init__(self, process, counters=None, childProcess="plugin-container"): """Args: counters: A list of counters to monitor. Any counters whose name does not match a key in 'counterDict' will be ignored. """ CounterManager.__init__(self) self.childProcess = childProcess self.pidList = [] self.primaryPid = mozpid.get_pids(process)[-1] os.stat('/proc/%s' % self.primaryPid) self._loadCounters() self.registerCounters(counters)
def __init__(self, ffprocess, process, counters=None, childProcess="plugin-container"): """Args: counters: A list of counters to monitor. Any counters whose name does not match a key in 'counterDict' will be ignored. """ CounterManager.__init__(self, ffprocess, process, counters) self.childProcess = childProcess self.runThread = False self.pidList = [] self.primaryPid = self.ffprocess._GetPidsByName(process)[-1] os.stat('/proc/%s' % self.primaryPid) self._loadCounters() self.registerCounters(counters)
def __init__(self, process, counters=None, childProcess="plugin-container"): CounterManager.__init__(self) self.childProcess = childProcess self.registeredCounters = {} self.registerCounters(counters) # PDH might need to be "refreshed" if it has been queried while the browser # is closed pdh.PdhEnumObjectsA(None, None, 0, 1, 0, True) for counter in self.registeredCounters: try: # Add the counter path for the default process. self._addCounter(process, 'process', counter) except talosError: # Assume that this is a memory counter for the system, not a process # counter # If we got an error that has nothing to do with that, the exception # will almost certainly be re-raised self._addCounter(process, 'Memory', counter) self._updateCounterPathsForChildProcesses(counter)