Following peak profiles during elastic and plastic deformation: A synchrotron-based technique