Application-Level Energy Accounting