A 53-year-old man is evaluated for a 6-week history of epigastric and chest discomfort. The onset of the pain has a variable relationship to stress and exercise and spicy food. The discomfort is relieved at times with antacids and with rest. He has hypertension and is a former smoker (quit 2 years ago). Medications are lisinopril and hydrochlorothiazide.

On physical examination, he is afebrile, blood pressure is 140/92 mm Hg, pulse rate is 78/min, and respiration rate is 12/min. BMI is 29. Funduscopic examination is normal. Results of the cardiac examination are normal, with no S3 or S4.

Electrocardiogram is shown.

Which of the following is the most appropriate diagnostic test to perform next?