Real-time optical dimensional metrology via diffractometry for nanofabrication