Profiling and learning based optimization for scalable robotics in the device-cloud continuum