예제 #1
0
파일: yappi.py 프로젝트: socialpercon/yappi
def set_clock_type(type):
    """
    Sets the internal clock type for timing. Profiler shall not have any previous stats.
    Otherwise an exception is thrown.
    """
    type = type.upper()
    if type not in CLOCK_TYPES:
        raise YappiError("Invalid clock type:%s" % (type))
    _yappi.set_clock_type(CLOCK_TYPES[type])
예제 #2
0
파일: yappi.py 프로젝트: socialpercon/yappi
def set_clock_type(type):
    """
    Sets the internal clock type for timing. Profiler shall not have any previous stats.
    Otherwise an exception is thrown.
    """
    type = type.upper()
    if type not in CLOCK_TYPES:
        raise YappiError("Invalid clock type:%s" % (type))
    _yappi.set_clock_type(CLOCK_TYPES[type])