def SampleMemoryUsage(self, parser_name):
    """Takes a sample of the memory usage for profiling.

    Args:
      parser_name (str): name of the parser.
    """
    if self._memory_profiler:
      used_memory = self._process_information.GetUsedMemory() or 0
      self._memory_profiler.Sample(parser_name, used_memory)
def SampleMemoryUsage ( self , parser_name ) : if self . _memory_profiler : used_memory = self . _process_information . GetUsedMemory ( ) or 0 self . _memory_profiler . Sample ( parser_name , used_memory )
Takes a sample of the memory usage for profiling.

    Args:
      parser_name (str): name of the parser.