Nanosecond resolution profiler and logger