Practical measurement of the residual stress in coatings