PerformanceProfiler class for testing blocks of code