Commit graph

11 commits

Author SHA1 Message Date
Hsin-Yi Chen
88eaae6913 Move main function out of namespace
Bug: 135473483
Test: adb shell /data/local/tmp/VtsHalPowerStatsV1_0TargetTest \
      --list_registered_services
Test: vts-tradefed run vts -m VtsHalPowerStatsV1_0Target
Change-Id: I01084afbf48cff268288a8cce23328a2e4d1e4a0
2019-06-18 16:09:36 +08:00
Steven Moreland
a878aee9ab Update makefies: no 'types'
Bug: 123976090
Test: N/A
Change-Id: I30fb04c81889b62775e1b764b965fdb0f893de17
2019-03-04 11:27:17 -08:00
Benjamin Schwartz
bd21041817 power.stats: Specifying opaqueness of some members
subsysName, railName, powerEntityName, and powerEntityStateName are all
opaque to the Android framework. Emphasizing the opaque nature of these
members in the HAL definition will help developers more quickly
understand the intent of the interface.

Bug: 125380339
Test: make
Change-Id: I42ed1f3cc928726ae146b6be849947b631ae48e6
2019-02-22 09:47:09 -08:00
Benjamin Schwartz
6bb3b5f099 power.stats: Use PowerStats HAL v1.0 in cuttlefish
Bug: 122267057
Test: Build cf_x86_phone-userdebug
Change-Id: I91a1b9d4db8acd2c47753e3b36ea20effd99e09a
2019-01-25 08:48:36 -08:00
Benjamin Schwartz
a51d9b91ee power.stats: Add more informative default implementation
The original default implementation for power.stats HAL did not have a
good example implementation of the power statistics related APIs. Adding
a new default implementation that gives a more informative example

Bug: 122267057
Test: run vts -m VtsHalPowerStatsV1_0Target
Test: adb shell "lshal debug android.hardware.power.stats@1.0::IPowerStats/default"
Observed the following output
========== PowerStats HAL 1.0 state residencies ==========
          Entity            State         Total time     Total entries   Last entry timestamp
   DefaultEntity           Active               1 ms                 2               3 ms
   DefaultEntity            Sleep               4 ms                 5               6 ms
========== End of PowerStats HAL 1.0 state residencies ==========

Change-Id: Ida0951c267f609b16bb6406da150ed2e504ced9a
2019-01-16 11:33:51 -08:00
Benjamin Schwartz
0a624b957a power/stats: Add VTS test cases for power.stats HAL
Adding VTS test cases for power.stats HAL functions
getPowerEntityInfo, getPowerEntityStateInfo, and getPowerEntityStateResidencyData

Bug: 118365266
Test: run vts -m VtsHalPowerStatsV1_0Target
Change-Id: Ib60ac0b37bd30663c5e7434546cdcfbf64915538
(cherry picked from commit a630f84814)
Merged-In: Ib60ac0b37bd30663c5e7434546cdcfbf64915538
2019-01-07 14:01:59 -08:00
Vinay Kalia
810ba8df2b power/stats: Add VTS testcases
VTS testcases to test following APIs:
1. getRailInfo(...)
2. getEnergyData(...)
3. streamEnergyData(...)

BUG: 118365266
BUG: 111185513
Test: run vts -m VtsHalPowerStatsV1_0Target
Change-Id: Ie90ecfae937beebf96a9d66eb4b10954242ad07b
(cherry picked from commit fc48be1079)
Merged-In: Ie90ecfae937beebf96a9d66eb4b10954242ad07b
2019-01-07 14:01:34 -08:00
Vinay Kalia
7b3d7a0afc power/stats: Add default implementation
Add default implementation for power.stats HAL

BUG: 118777168
BUG: 111185513

Test: run vts -m VtsHalPowerStatsV1_0Target
Change-Id: Id81291f58a5cdfa0cc1f56356001b2862df0dbc2
(cherry picked from commit f94dda77a1)
Merged-In: Id81291f58a5cdfa0cc1f56356001b2862df0dbc2
2019-01-07 14:01:03 -08:00
Benjamin Schwartz
6b8d778c36 power/stats: Update HIDL to include power stats API
Adding new power.stats HAL api for subsystem low power stats collection that will eventually replace legacy power stats api.

BUG: 117887759
BUG: 111185513
Test: build successfully
Change-Id: I0da4de378ba0b5daeeb5c2b15435a0c22eff08b4
(cherry picked from commit f836c07bda)
Merged-In: I0da4de378ba0b5daeeb5c2b15435a0c22eff08b4
2019-01-07 14:00:36 -08:00
Vinay Kalia
3b91fd4ab6 power/stats: Update HIDL to use synchronous FMQ
Unsynchronous queue do not help solve the problem of
supporting multiple clients of power.stats. Since, there
is no current requirement to support multiple clients so
using synchronous queues instead.

BUG: 117424656
BUG: 111185513
Test: run vts -m VtsHalPowerStatsV1_0Target
Change-Id: Iab73de5a460e2a0ec5e949f8b021a87aefed58c8
(cherry picked from commit 84a48b8325)
Merged-In: Iab73de5a460e2a0ec5e949f8b021a87aefed58c8
2019-01-07 14:00:10 -08:00
Vinay Kalia
f12c171b3a power.stats: Add power.stats HIDL interface
Initial commit defines APIS to collect on-device
power-related data.

BUG: 117424656
BUG: 111185513
Test: Compilation and device boot
Change-Id: I6e3153c9fcd2d67e4a566a4621d7aa4c01da7636
(cherry picked from commit f91dcb5bfd)
Merged-In: I6e3153c9fcd2d67e4a566a4621d7aa4c01da7636
2019-01-07 13:58:41 -08:00