Measurement of gas retention