Add profiling functions