Staying in phase and measuring sags...

I really need to get my hands on some data first to see how one would be test the condition.

See:-
http://www.compliance-club.com/archive/old_archive/020122.htm
Look at section 6.5 AC mains supply dips, dropouts and interruptions