Implemented a simple Profiler class.