'Creates a profiler for a function.
Every profiler has its own log file (the name of which is derived
from the function name).
TraceFuncCoverage registers an atexit handler that prints
profiling information to sys.stderr when the program terminates.
The log file is not removed and remains there to clutter the
current working directory.'

def __init__(self, fn):

    self.fn = fn
    self.logfilename = (fn.__name__ + '.cprof')
    self.ncalls = 0
    atexit.register(self.atexit)
