factor out profiler-specific code to new component