I'm writing a profiler, where different functions should be profiled. Each of the functions, that should be profiled, returns an event, that holds timing data. I don't have access to the implementation of the functions, but have to bundle the returned event with parameters I called the function with.
As example I have the function-call
ev1 = a(parameter,x,y,z)
and
ev2 = b(parameter,foo)
At the end of my programm, I want to collect all events returned from this functions, together with each parameter
and ideally with the names of the functions. In this example at the end of my program, I would have something like:
[('a',parameter,ev1),('b',parameter,ev2)]
I thought of doing some kind of wrapper function, but am not sure on how to give the wrapper function the name of all possible functions to be called.