parameters: (self, deterministic_mode=False)
return_statement: return dump_id
docstring: Add a memory measurement to the trace being recorded.
  
      Behaves as a no-op if tracing is not enabled.
  
      TODO(perezju): Also behave as a no-op if tracing is enabled but
      memory-infra is not.
  
      Args:
        deterministic_mode: A boolean indicating whether to attempt or not to
            control the environment (force GCs, clear caches) before making the
            measurement in an attempt to obtain more deterministic results.
  
      Returns:
        GUID of the generated dump if one was triggered, None otherwise.
docstring_summary: Add a memory measurement to the trace being recorded.
docstring_tokens: Add a memory measurement to the trace being recorded .
function: def MeasureMemory(self, deterministic_mode=False):
      """Add a memory measurement to the trace being recorded.
  
      Behaves as a no-op if tracing is not enabled.
  
      TODO(perezju): Also behave as a no-op if tracing is enabled but
      memory-infra is not.
  
      Args:
        deterministic_mode: A boolean indicating whether to attempt or not to
            control the environment (force GCs, clear caches) before making the
            measurement in an attempt to obtain more deterministic results.
  
      Returns:
        GUID of the generated dump if one was triggered, None otherwise.
      """
      platform = self.tab.browser.platform
      if not platform.tracing_controller.is_tracing_running:
        logging.warning('Tracing is off. No memory dumps are being recorded.')
        return None
      if deterministic_mode:
        self.Wait(_DUMP_WAIT_TIME)
        self.ForceGarbageCollection()
        if platform.SupportFlushEntireSystemCache():
          platform.FlushEntireSystemCache()
        self.Wait(_DUMP_WAIT_TIME)
      dump_id = self.tab.browser.DumpMemory()
      assert dump_id, 'Unable to obtain memory dump'
      return dump_id
function_tokens: def MeasureMemory ( self , deterministic_mode = False ) : platform = self . tab . browser . platform if not platform . tracing_controller . is_tracing_running : logging . warning ( 'Tracing is off. No memory dumps are being recorded.' ) return None if deterministic_mode : self . Wait ( _DUMP_WAIT_TIME ) self . ForceGarbageCollection ( ) if platform . SupportFlushEntireSystemCache ( ) : platform . FlushEntireSystemCache ( ) self . Wait ( _DUMP_WAIT_TIME ) dump_id = self . tab . browser . DumpMemory ( ) assert dump_id , 'Unable to obtain memory dump' return dump_id