Add profiling to all domain functions