def Collect(self):

    user, system = self.proc.cpu_times()
    percent = self.proc.cpu_percent()
    self.cpu_samples.append((rdfvalue.RDFDatetime().Now(),
                             user, system, percent))
    # Keep stats for one hour.
    self.cpu_samples = self.cpu_samples[-3600 / self.sleep_time:]

    # Not supported on MacOS.
    try:
      _, _, read_bytes, write_bytes = self.proc.io_counters()
      self.io_samples.append((rdfvalue.RDFDatetime().Now(),
                              read_bytes, write_bytes))
      self.io_samples = self.io_samples[-3600 / self.sleep_time:]
    except (AttributeError, NotImplementedError, psutil.Error):
      pass
Pet.addPet
dataset/ETHPy150Open google/grr/grr/client/client_stats.py/ClientStatsCollector.Collect--crossover with--dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/tests/v1_2/test_io.py/SwaggerRequest_Pet_TestCase.test_addPet