automation: measue main loop