'Dump profile data into self.path.'

def run(self, func, *args, **params):

    global _count
    c = _count = (_count + 1)
    path = os.path.join(self.path, ('cp_%04d.prof' % c))
    prof = profile.Profile()
    result = prof.runcall(func, *args, **params)
    prof.dump_stats(path)
    return result
