Spirometry is a pulmonary function test used to assess lung performance by measuring the volume and flow of air during inhalation and exhalation.