Revert "Revert "Add mini profiler""

This reverts commit b1130fc7b10ff6b81613478631f6e675b3dd8f8c.