I think we need to calculate the weight loss of that pipe wall. One of the prominent method to do so is Arrhenius method. Then, you may determine the time that the pipe will last under specific conditions (i. e., temp, flow, oxidant agent, etc). Thanks.
You can find corrosion rate ( assuming uniform corrosion of pipe) via polarization experiments (eg. Tafel Plots). Then you can make rough estimate of the lifetime of your pipe depending on how thick your pipe is.