Electrocardiogram, or ECG, measures the electrical activity of the heart, to make sure it’s performing properly. ECGs are used by doctors to check the rhythm of the heart and make sure it’s not too fast or too slow, so as to gauge whether enough blood is being pumped around the body. An ECG can be used to test for heart attacks, or to see if a patient has had a heart attack in the past.