An implantable medical device applies an electric signal to at least a portion of a heart in a subject. A resulting electric signal is collected from the heart and is used together with the applied signal for determining a cardiogenic impedance signal. The impedance signal is processed in order to estimate an isovolumetric contraction time, an isovolumetric relaxation time and an ejection time for a heart cycle. These three time parameters are employed for calculating a Tei-index of the heart. The Tei-index can be used as myocardial performance parameter in heart diagnosis and/or cardiac therapy adjustment.