Profiler: utility class for measuring performance