The folks at [electro-labs] designed this simple USB power meter which does just that ... amplified by the LT6106 a high side current sense amplifier before being fed to the 10 bit analog port ...