Measuring the dark current on a reverse-biased diode