A blood gas test is performed to assess lung functions and to obtain information regarding the circulatory system's operation.