'Profile a singe call to the function.'

def __call__(self, *args, **kw):

    self.ncalls += 1
    if (self.skip > 0):
        self.skip -= 1
        self.skipped += 1
        return self.fn(*args, **kw)
    if FuncProfile.in_profiler:
        return self.fn(*args, **kw)
    profiler = self.Profile()
    try:
        FuncProfile.in_profiler = True
        return profiler.runcall(self.fn, *args, **kw)
    finally:
        FuncProfile.in_profiler = False
        self.stats.add(profiler)
        if self.immediate:
            self.print_stats()
            self.reset_stats()
