Add simple code profiling function