Automatic measurement of waveform features