Fast measurements of important electron beam parameters by variation of beam focusing