A quantitative criterion to describe the deformation process of rock sample subjected to uniaxial compression: From criticality to final failure