Fixed
Status Update
Comments
cc...@google.com <cc...@google.com> #2
Thanks for the report, we should have a wrapper for this in PowerMetric
cc...@google.com <cc...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 1c2d72fbf20c936b18a8e887f7c82aa8e2c706b5
Author: Chris Craik <ccraik@google.com>
Date: Tue Mar 19 10:45:01 2024
Add API for checking power metric device support
Fixes: 322121218
Test: PowerMetricTest
Relnote: "Added PowerMetric.deviceBatteryHasMinimumCharge() and
PowerMetric.deviceSupportsPowerEnergy() to enable changing or skipping
benchmarks based on device power measurement capability."
Change-Id: I6a591cd0c68e7a9e93069ee7f636fc1772f9a256
M benchmark/benchmark-macro/api/current.txt
M benchmark/benchmark-macro/api/restricted_current.txt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/PowerMetricTest.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/PowerRailTest.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/PowerRail.kt
https://android-review.googlesource.com/3040212
Branch: androidx-main
commit 1c2d72fbf20c936b18a8e887f7c82aa8e2c706b5
Author: Chris Craik <ccraik@google.com>
Date: Tue Mar 19 10:45:01 2024
Add API for checking power metric device support
Fixes: 322121218
Test: PowerMetricTest
Relnote: "Added PowerMetric.deviceBatteryHasMinimumCharge() and
PowerMetric.deviceSupportsPowerEnergy() to enable changing or skipping
benchmarks based on device power measurement capability."
Change-Id: I6a591cd0c68e7a9e93069ee7f636fc1772f9a256
M benchmark/benchmark-macro/api/current.txt
M benchmark/benchmark-macro/api/restricted_current.txt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/PowerMetricTest.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/PowerRailTest.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/PowerRail.kt
Description
Component used: Macrobenchmarks Version used: N/A Devices/Android versions reproduced on: N/A
Attempting to obtain
PowerMetrics
on unsupported devices sees this:PowerRail
though,LIBRARY_GROUP_SCOPE