Profiler implemented

Builds a tree of measurements for each iteration. Measurements are in
milli seconds with nanosecond resolution(?).