Some local libraries (e.g. in Heidelberg) or ecological initiatives lend devices to measure electricity consumption at the power plug. In particular, this is useful to measure other appliances as well.
Specifically for computers, they probably have some means to tell you their own consumption, but they may not be accurate or complete and will most certainly omit any peripherals, e.g. external hard drives.
Rather than running a Tor relay, running a simple Tor bridge (e.g. via the browser add-on Snowflake as suggested by @[email protected]) is probably the best thing to do with one’s home hardware.
Actual relays must suffice certain requirements, according to the Tor project:
As for exit relays aka exit nodes, the obligatory advice is of course to not run them at all unless you know exactly what you are doing both legally and technically, and probably only if you’re a foundation or something.