We present a new diagnostic method allowing one to reconstruct certain properties of a relativistic electron beam and of a laser pulse by looking at the result of their interaction. The latter takes place within an undulator and results in energy modulation of electrons. By taking advantage of the correlation between time and electron-beam energy, measurements of the electron-beam length, current and energy spread are possible simultaneously. Moreover, the scheme allows an accurate measurement of the timing jitter between the electron beam and the external laser and also of the laser’s actual pulse length at the interaction point. Experimental demonstration of the last two measurements is reported in this paper. Finally, this diagnostic method provides an independent measure of the energy transferred from the electron beam to free-electron laser light produced when seeded electrons are injected into a long undulator. Experimental results obtained at the FERMI free-electron laser are presented after a description of the proposed technique