measuring a bad motor and large current spikes in a brush motor
I suspect that the below circuit will do the trick.  You have a current sensor (I like the INA139) which senses the motor current and outputs a current directly proportional to the motor current, peaks and all.

The diode doesn't allow the output voltage to be reversed, so the capacitor holds a charge that is proportional to the peak.  R1 acts as a slow 'bleed' resistor.

The comparator circuit does the comparison for you, with a little hysteresis.

You may have to adjust some resistance and capacitance values, but this should get you close.

Also, if you are interested, I have a breadboard current sensor laid out already and somewhat documented.  It is open-source, so all of the information is there.