Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit cb308d9c authored by Blake Kragten's avatar Blake Kragten
Browse files

Power Monitor Addition framworks base:

Frameworks Base section of power monitor addition. Since IPowerStats
does not have a java interface, we needed to make a native interface
into the code. I followed how the LowPowerStats collection is being
done.

Native code is located in
com_android_server_am_BatteryStatsService.cpp. We are calling the
getEnergyData to get all rails energy data that has been collecting from
boot. This energy data is collected in uWs (microWatt seconds). After
the rail data is collected at each update in the RailStats class, the
wifi and cellular total energy values will contain the energy that all
rails associated with the specific subsystem will have.

We update and collect the energy data using battery stats and propagate
it to telephony metrics. When we collect the total energy for an update
we need to zero out the energy data so it can be accumulated correctly.

1/31: Added modemRailEnergy and wifiRailEnergy to Volta historian.

Bug: 115929961
Test: adb shell dumpsys activity service TelephonyDebugService --metrics
Results Examples:
	Energy consumed by modem (mAh): 2.41
	Energy Rails consumed by modem (mAh): 2.76
Dumpsys historian results:
	  +4m23s712ms (2) 100 cc511a18 modemRailChargemAh=0.34 wifiRailChargemAh=1.17 +wifi_scan stats=0:"dump"
         +10m24s089ms (2) 100 c4511a18 modemRailChargemAh=0.71 wifiRailChargemAh=1.77 stats=0:"write"
         +11m24s228ms (3) 100 c4511a19 volt=4315 charge=3988 modemRailChargemAh=0.77 wifiRailChargemAh=1.94 wifi_signal_strength=2 stats=0:"battery-state"

Change-Id: I97521a03204968079e61f3de86640d4f1a580255
parent 7b8b2c3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment