It would be impossible to measure the heat produced by any such electrical impulses, as nerve cells run hot to begin with, and the signals are quite feeble.
However, neither is correct. The idea that electricity runs along your nerves is popular in science fiction, but it is not correct.
A normal nerve cell in its resting state is "hyperpolarized." It has a large number of charged sodium ions inside the cell--larger than the number of ions outside the cell. For this reason, there is a charge potential gradient across the membrane fo the cell.
When the cell fires, it "depolarizes." Ion channels in the cell membrane open up, and the ions rush out of the cell to equalize the concentration of ions outside and inside the cell. When the depolarization reaches the end of the cell, it stimulates the release of neurotransmitter chemicals from the end of the cell's axon. These chemicals bridge the gap to a neighboring nerve cell or to a muscle, stimulating it to depolarize (if the cell is a nerve cell) or contract (if the cell is a muscle).
After the cell has depolarized, an active ion pump mechanism switches on. This pump takes the form of a complex protein in the cell's membrane that acts as a gateway. The protein has a charged end and attracts the ions outside the cell membrane. The ions bond loosely to the protein, changing its configuration. A molecule of ATP then connects to the inside of the protein and loses a phosphate, producing energy which drives the protein to change its configuration again, drawing the ion into the cell. This "ion channel pump" resets the nerve cell to a hyperpolarized state, readying it for firing again. During the refractory period when the cell is hyperpolarizing again, it can not be made to fire again.
(My college background is in neurobiology and neurophysiology.
)