Methylene blue reduction test is done for estimating?