Be sure to subscribe for updates on this and all my other data analysis projects!





Lifetime Trend

Battery capacity of my MacBook Pro over 3+ years and

730 load cycles. 100% = 4600 mAh. Orange line is 3rd-

order polynomial least-squares fit.

Here we have all the data I've gathered on my battery over the entire 3+ years of ownership. (Here's another blog who has done a similar analysis over a shorter amount of time.) I've tried hard to treat my battery properly , and still get 2.5 hours of use.





I got clever with a cron job & shell script that saved battery data every minute my computer was being used (doesn't run when asleep), shown in blue. This gives us an idea of the uncertainty on the capacity measurement from the battery.



Oversampling

Battery capacity readings taken at 1-mintue intervals for ~11 days.

Here is the 1-minute data, covering about 11 days of laptop use. The battery capacity jumps around by ~5%, but no clear trend of when it jumps. The cron job ran without complaint, and I never noticed any decrease in laptop performance.



Usage History

Computer (black) and email (blue) usage versus time.





The very early morning battery data is a byproduct of me using my laptop to observe with the Apache Point Observatory 3.5meter telescope during one of the 11 nights. Otherwise, my usage pattern is very similar to that of my emails, but with more emphasis on the evenings (again probably due to observing... and Lastly, the 1-minute battery data contains a fascinating byproduct: it keeps a detailed record of when I'm using my computer. Shown in black is a histogram of the number of battery samples taken over the 11 days, in 30 minute bins. Overlaid in blue we see the number of emails sent over a year in 30 min bins, taken from a previous post.Themorning battery data is a byproduct of me using my laptop to observe with the Apache Point Observatory 3.5meter telescope during one of the 11 nights. Otherwise, my usage pattern is very similar to that of my emails, but with more emphasis on the evenings (again probably due to observing... and Netflix

Conclusions Keeping the battery log for 11 days required about 2.4 MB of space. This could be trimmed down with a more careful script that saved fewer characters, but the point is clear: it is trivial (under 300 MB) to save 1-minute battery data for the entire 3-year life of your computer. If you only took samples every 5 minutes, you could still get very accurate sampling of the battery health, and your general computer usage, at a cost of 50-60 MB of hard drive space. In today's world, this is the same as free.



My computer is out of warranty, I feel like I'm living on borrowed time. Keeping the battery log for 11 days required about 2.4 MB of space. This could be trimmed down with a more careful script that saved fewer characters, but the point is clear:If you only took samples every 5 minutes, you could still get very accurate sampling of the battery health, and your general computer usage, at a cost of 50-60 MB of hard drive space. In today's world, this is the same as free.My computer is out of warranty, I feel like I'm living on borrowed time. Rumors are swirling about possible upgrades to the Apple notebook line soon, and I'm eager to purchase a replacement. When I do, I will surely be implementing my little cron script and recording fascinating computer usage data!