Measuring mains voltage and powering a raspberry pi from the same adapter
Yes using any calibrated “instrument transformer” can measure primary AC  voltage with known verified ratio.

You may or not be interested in doing all types of measurements, peak and average then convert both to rms for a sine wave.  This depends on signal conditioning in both cases for bandwidth and then sample rate. You can also use S&amp;H and trigger events that exceed a preset threshold or a a ratio differenc and then choose to compress sampled data with statistics such as % of time below -10% of nominal.   

Just a few ideas