2

I want to analyze battery consumption of an app and ran:

> adb shell dumpsys batterystats > dump.txt

Within the filedump I found the section I am interested in:

  Estimated power use (mAh):
    Capacity: 3020, Typical: 3100, Computed drain: 1395, actual drain: 1510-1570
    Screen: 770 Excluded from smearing
    Uid u0a387: 364 ( wake=5.23 radio=0.0425 wifi=4.51 gps=349 sensor=4.88 ) Including smearing: 402 ( proportional=38.6 )
    Cell standby: 128 ( radio=128 ) Excluded from smearing
    Unaccounted: 115 ( ) Including smearing: 0 ( ) Excluded from smearing
    Uid u0a382: 40.6 ( wake=5.00 radio=1.40 wifi=34.2 ) Including smearing: 801 ( screen=684 proportional=76.9 )
    Idle: 27.4 Excluded from smearing
    Uid u0a83: 17.7 ( wake=0.240 radio=0.202 wifi=5.84 gps=2.33 sensor=9.06 ) Including smearing: 19.6 ( proportional=1.88 )
    Wifi: 10.0 ( wifi=10.0 ) Including smearing: 11.1 ( proportional=1.07 )
    ...

Each line contains info on "smearing", and if smearing is included part of this seems to be something called "proportional". These terms are not explained at all in the documentation.

2
  • 1
    Looks like the source code has some descriptions about them, though I haven't been able to really understand how they work.
    – Andrew T.
    Apr 20 at 11:46
  • @AndrewT. Looks like you are right, I'll update my answer
    – M.T
    Apr 20 at 11:54

1 Answer 1

1

Thanks to @Andrew.T for pointing out the source code:

  • Smearing: Battery consumption which is shared with other components/processes is spread among apps. IFAIU there are two categories: "screen" and "proportional":
    • Screen: Smeared power from screen usage. Screen usage power is split and smeared among apps, based on activity time.
    • Proportional: Smeared power using proportional method. Power usage from hidden sippers is smeared to all apps proportionally (except for screen usage).

A "hidden sipper" is a source of battery usage which is one of IDLE, CELL, SCREEN, AMBIENT_DISPLAY, UNACCOUNTED, OVERCOUNTED or if it is a service or system app.

Proportional is then computed according to the following:

proportional power = hidden power * app power ratio

where "hidden power" is the power usage by hidden components(sippers), app power ratio the estimated power usage of a non-hidden sipper compared to the overall non-hidden sipper power usage.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .