Hi,
I've actually done this. I wanted to know at least approximately how much power different programs would cause the computer to draw. I found that programs that use the CPU cause the most power draw, and if you have a system with multiple cores and the cores are turned on and off as needed, as the cores come into play one by one more and more power is drawn. For example, with one chess program running (while the computer is 'thinking') the CPU might use 30 watts, but then if two chess programs are running 60 watts, etc. That happens up to the number of cores being used. So with 8 cores and 4 chess programs running the computer is using about 50 percent of the total power it might use, but with all 8 cores running it would use the max power of the CPU.
Chess programs make good test programs because they are constantly using the CPU when it is the computer's turn, and you can make settings in the program to keep it thinking for a long time so it constantly uses one of the cores. If you happen to get a more advanced chess program that can use multiple cores then it may use more cores at the same time just for that one program. Setting the program to make sure it is thinking on the human's turn too keeps it running in the background even if it is not the computer's turn.
For the measurements i used two different ideas:
1. 0.2 ohm 1 percent non inductive resistor, rated 50 watts. The power rating is to keep it very cool not because it needs that much power.
2. A standard "Kill-O-Watt" power monitor for the line power.
Both of these methods gave reasonable results, but i think the second was the simplest and also allowed a direct power reading.
Note not all motherboards allow the power down of individual cores and some do it a little differently too.