Shot peening is a surface treatment method mainly used to improve the durability and reliability of metal parts. Materials such as iron and ceramics are shot at the surface of metal parts at high speed to create compressive residual stress, which improves fatigue strength and durability against stress corrosion. Shot peening is applied, for example, to metal parts on aircraft and automobiles, pressure vessels in chemical plants, etc., which are used continuously for a long time. Residual stress measurement by X-ray diffraction is the most common method to evaluate the effect of the shot peening process. In this method, the sample surface is removed stepwise by electrolytic polishing, and X-rays are irradiated to measure the stress at each step. The relationship between depth from the sample surface and residual stress is thus evaluated. In electrolytic polishing, the surface of the sample is electrochemically polished, making it possible to uniformly remove the surface of the sample without applying physical forces.