class_docstr: Record type for benchmark times
class_docstr_tok: ["Record","type","for","benchmark","times"]
code: def __init__(
      self,
      running_time=None,
      max_rss=None,
      max_vms=None,
      max_uss=None,
      max_pss=None,
      io_in=None,
      io_out=None,
      cpu_usages=None,
      cpu_time=None,
  ):
      #: Running time in seconds
      self.running_time = running_time
      #: Maximal RSS in MB
  
      self.max_rss = max_rss
      #: Maximal VMS in MB
      self.max_vms = max_vms
      #: Maximal USS in MB
      self.max_uss = max_uss
      #: Maximal PSS in MB
      self.max_pss = max_pss
      #: I/O read in bytes
      self.io_in = io_in
      #: I/O written in bytes
      self.io_out = io_out
      #: Count of CPU seconds, divide by running time to get mean load estimate
      self.cpu_usages = cpu_usages or 0
      #: CPU usage (user and system) in seconds
      self.cpu_time = cpu_time or 0
      #: First time when we measured CPU load, for estimating total running time
      self.first_time = None
      #: Previous point when measured CPU load, for estimating total running time
      self.prev_time = None
      #: Set with procs that has been skipped
      self.processed_procs = dict()
      #: Set with procs that has been saved
      self.skipped_procs = set()
      #: Track if data has been collected
      self.data_collected = False
  
imports: import contextlib
  import datetime
  from itertools import chain
  import os
  import time
  import threading
  from snakemake.logging import logger
label_desc: Use image node_id 2 to create a new BenchmarkRecord object  with example: obj = BenchmarkRecord(running_time, max_rss, max_vms, max_uss, max_pss, io_in, io_out, cpu_usages, cpu_time)