parameters: (self, entry, start=None, end=None, phase=None)
return_statement: return entry
docstring: Helper function to append resource information to a dict.
docstring_summary: Helper function to append resource information to a dict.
docstring_tokens: Helper function to append resource information to a dict .
function: def add_resources_to_dict(self, entry, start=None, end=None, phase=None):
          """Helper function to append resource information to a dict."""
          cpu_percent = self.resources.aggregate_cpu_percent(start=start,
              end=end, phase=phase, per_cpu=False)
          cpu_times = self.resources.aggregate_cpu_times(start=start, end=end,
              phase=phase, per_cpu=False)
          io = self.resources.aggregate_io(start=start, end=end, phase=phase)
  
          if cpu_percent is None:
              return entry
  
          entry['cpu_percent'] = cpu_percent
          entry['cpu_times'] = list(cpu_times)
          entry['io'] = list(io)
  
          return entry
function_tokens: def add_resources_to_dict ( self , entry , start = None , end = None , phase = None ) : cpu_percent = self . resources . aggregate_cpu_percent ( start = start , end = end , phase = phase , per_cpu = False ) cpu_times = self . resources . aggregate_cpu_times ( start = start , end = end , phase = phase , per_cpu = False ) io = self . resources . aggregate_io ( start = start , end = end , phase = phase ) if cpu_percent is None : return entry entry [ 'cpu_percent' ] = cpu_percent entry [ 'cpu_times' ] = list ( cpu_times ) entry [ 'io' ] = list ( io ) return entry