Completely FREE and OPEN SOURCE battery monitoring widget. Shows graph of battery usage over time and allows your to monitor your battery usage.
Now with the ability to monitor the battery level of your Android Wear watch as well!
On Android Lollipop devices, has the ability to graph battery current (i.e. instantaneous usage) in milli-amperes, and battery energy level, in milli-watt hours.
Source code here: https://github.com/codeka/advbatterygraph