'Optionally create a new profiler based on caller\'s qualname.'

def __new__(cls, msg=None, disabled='env', delayed=True):

    if ((disabled is True) or ((disabled == 'env') and (len(cls._profilers) == 0))):
        return cls._disabledProfiler
    caller_frame = sys._getframe(1)
    try:
        caller_object_type = type(caller_frame.f_locals['self'])
    except KeyError:
        qualifier = caller_frame.f_globals['__name__'].split('.', 1)[1]
    else:
        qualifier = caller_object_type.__name__
    func_qualname = ((qualifier + '.') + caller_frame.f_code.co_name)
    if ((disabled == 'env') and (func_qualname not in cls._profilers)):
        return cls._disabledProfiler
    cls._depth += 1
    obj = super(Profiler, cls).__new__(cls)
    obj._name = (msg or func_qualname)
    obj._delayed = delayed
    obj._markCount = 0
    obj._finished = False
    obj._firstTime = obj._lastTime = ptime.time()
    obj._newMsg(('>    Entering    ' + obj._name))
    return obj
