Crude but working embedded profiler