add unit test for Profiler.