Methods for recording the time profile of single ultrashort pulses of electron beams and discharge currents in real-time mode