habitat.utils.profiling_wrapper.RangeContext class

Annotate a range for profiling. Use as a function decorator or in a with statement. See habitat_sim profiling_utils.

Methods

def _recreate_cm(self)
Return a recreated instance of self.

Special methods

def __call__(self, func)
def __enter__(self)
def __exit__(self, *exc)
def __init__(self, msg: str)

Method documentation

def habitat.utils.profiling_wrapper.RangeContext._recreate_cm(self)

Return a recreated instance of self.

Allows an otherwise one-shot context manager like _GeneratorContextManager to support use as a decorator via implicit recreation.

This is a private interface just for _GeneratorContextManager. See issue #11647 for details.