Add profiling macros
Merge pull request #371 from paultag/paultag/feature/profile

Add profile macro.