Single phase energy meter using XMEGA A (PDF!):
AVR1631 single-phase energy meter design is based on the Atmel XMEGA® A4U microcontroller. This design is a lowcost
solution considering the entire requirement for low-cost energy meter discussed in the previous sections.

kill-a-watt ?
If you’re doing this one-off, ladyada’s kill-a-watt hack is the best bet.
If you’re doing this for real (a product), I’d suggest looking at Cirrus Logic and their line of
power monitors (like the CS5463) or the Analog Devices power chips. This Atmel app
note does the arithmetic in the MCU. It seems simple, but it is NOT. It’s much better
to have a separate chip do the multiplication and summation. Been there, done that,
not doing it again. (Hint: your error budget depends on syncing the ADC to the line
frequency).
The analog front end to the ADC is useful to study in this app note.