Event loop detector and analyzer