generalize profiler