Assigned
Status Update
Comments
ro...@google.com <ro...@google.com> #2
Any suggestions on where such an interface might live? I don't think it makes sense for the interface to be in the drawerlayout artifact if you're specifically going to use the interface to *not* use DrawerLayout.
cc...@google.com <cc...@google.com> #3
androidx.customview would be a good candidate. This is used by all of the widget libraries.
ma...@google.com <ma...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 3ed3fb003fa6c1244f923202859a616225b5b2fa
Author: Ian Lake <ilake@google.com>
Date: Fri Feb 14 11:17:46 2020
Create an interface for layouts that can be opened
Create a common interface that represents layouts
that have two states: open and closed. This allows
higher level libraries to rely on the interface,
rather than concrete implementations such as
DrawerLayout, making them more resilient to
changes in the current recommended implementation.
Fixes: 129979320
Test: ./gradlew checkApi
Change-Id: I0f2a1414977825aa053c6555261f2b7d4417bd19
M customview/customview/api/1.1.0-alpha02.txt
M customview/customview/api/current.txt
M customview/customview/api/public_plus_experimental_1.1.0-alpha02.txt
M customview/customview/api/public_plus_experimental_current.txt
M customview/customview/api/restricted_1.1.0-alpha02.txt
M customview/customview/api/restricted_current.txt
A customview/customview/src/main/java/androidx/customview/widget/Openable.java
M drawerlayout/drawerlayout/api/1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/current.txt
M drawerlayout/drawerlayout/api/public_plus_experimental_1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/public_plus_experimental_current.txt
M drawerlayout/drawerlayout/api/restricted_1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/restricted_current.txt
M drawerlayout/drawerlayout/build.gradle
M drawerlayout/drawerlayout/src/main/java/androidx/drawerlayout/widget/DrawerLayout.java
M jetifier/jetifier/migration.config
M slidingpanelayout/slidingpanelayout/api/1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/current.txt
M slidingpanelayout/slidingpanelayout/api/public_plus_experimental_1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/public_plus_experimental_current.txt
M slidingpanelayout/slidingpanelayout/api/restricted_1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/restricted_current.txt
M slidingpanelayout/slidingpanelayout/src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.java
https://android-review.googlesource.com/940787
Branch: androidx-master-dev
commit 3ed3fb003fa6c1244f923202859a616225b5b2fa
Author: Ian Lake <ilake@google.com>
Date: Fri Feb 14 11:17:46 2020
Create an interface for layouts that can be opened
Create a common interface that represents layouts
that have two states: open and closed. This allows
higher level libraries to rely on the interface,
rather than concrete implementations such as
DrawerLayout, making them more resilient to
changes in the current recommended implementation.
Fixes: 129979320
Test: ./gradlew checkApi
Change-Id: I0f2a1414977825aa053c6555261f2b7d4417bd19
M customview/customview/api/1.1.0-alpha02.txt
M customview/customview/api/current.txt
M customview/customview/api/public_plus_experimental_1.1.0-alpha02.txt
M customview/customview/api/public_plus_experimental_current.txt
M customview/customview/api/restricted_1.1.0-alpha02.txt
M customview/customview/api/restricted_current.txt
A customview/customview/src/main/java/androidx/customview/widget/Openable.java
M drawerlayout/drawerlayout/api/1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/current.txt
M drawerlayout/drawerlayout/api/public_plus_experimental_1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/public_plus_experimental_current.txt
M drawerlayout/drawerlayout/api/restricted_1.1.0-alpha03.txt
M drawerlayout/drawerlayout/api/restricted_current.txt
M drawerlayout/drawerlayout/build.gradle
M drawerlayout/drawerlayout/src/main/java/androidx/drawerlayout/widget/DrawerLayout.java
M jetifier/jetifier/migration.config
M slidingpanelayout/slidingpanelayout/api/1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/current.txt
M slidingpanelayout/slidingpanelayout/api/public_plus_experimental_1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/public_plus_experimental_current.txt
M slidingpanelayout/slidingpanelayout/api/restricted_1.1.0-alpha01.txt
M slidingpanelayout/slidingpanelayout/api/restricted_current.txt
M slidingpanelayout/slidingpanelayout/src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.java
ro...@google.com <ro...@google.com> #5
Yeah that's expected, it's a hardware limitation. On x86 you can read 4 counters for instance.
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit d92993c457910c55bb8884edaf4b17886c2c1bb5
Author: Marcello Albano <maralb@google.com>
Date: Fri May 26 08:26:19 2023
Added performance counters from google/filament
Bug:286306579
Test: CpuCounterTest # Tested on rooted emulators API 21,22,23,28,29,30,31
Test: CpuCounterBenchmark
Initial support, not actively used yet.
These appear to only work easily through API 29, after which they require
`setenforce 0`, and `setprop security.perf_harden overridden 0`.
Observed that API 28 emulator fails to find file, other emulators all
successfully report instruction counts.
Change-Id: Ie5feb8ad8b0c90b403ac5d85ff441053ac71e9ec
M benchmark/benchmark-common/build.gradle
A benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/CpuCounterTest.kt
A benchmark/benchmark-common/src/main/cpp/CMakeLists.txt
A benchmark/benchmark-common/src/main/cpp/Profiler.cpp
A benchmark/benchmark-common/src/main/cpp/Profiler.h
A benchmark/benchmark-common/src/main/cpp/androidx_benchmark_CpuCounter.cpp
A benchmark/benchmark-common/src/main/cpp/compiler.h
A benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuCounter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/DeviceInfo.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Shell.kt
A benchmark/benchmark/src/androidTest/java/androidx/benchmark/benchmark/CpuCounterBenchmark.kt
https://android-review.googlesource.com/2606296
Branch: androidx-main
commit d92993c457910c55bb8884edaf4b17886c2c1bb5
Author: Marcello Albano <maralb@google.com>
Date: Fri May 26 08:26:19 2023
Added performance counters from google/filament
Bug:286306579
Test: CpuCounterTest # Tested on rooted emulators API 21,22,23,28,29,30,31
Test: CpuCounterBenchmark
Initial support, not actively used yet.
These appear to only work easily through API 29, after which they require
`setenforce 0`, and `setprop security.perf_harden overridden 0`.
Observed that API 28 emulator fails to find file, other emulators all
successfully report instruction counts.
Change-Id: Ie5feb8ad8b0c90b403ac5d85ff441053ac71e9ec
M benchmark/benchmark-common/build.gradle
A benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/CpuCounterTest.kt
A benchmark/benchmark-common/src/main/cpp/CMakeLists.txt
A benchmark/benchmark-common/src/main/cpp/Profiler.cpp
A benchmark/benchmark-common/src/main/cpp/Profiler.h
A benchmark/benchmark-common/src/main/cpp/androidx_benchmark_CpuCounter.cpp
A benchmark/benchmark-common/src/main/cpp/compiler.h
A benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuCounter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/DeviceInfo.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Shell.kt
A benchmark/benchmark/src/androidTest/java/androidx/benchmark/benchmark/CpuCounterBenchmark.kt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 4c1ee5848fbf8167493db0a289a71aed1f0d15ff
Author: Chris Craik <ccraik@google.com>
Date: Tue Jun 13 11:39:25 2023
Support for micro metrics to report multiple values
Test: MetricsContainerTest
Test: TrivialKotlinBenchmark
Bug: 286306579
Counters should start/stop together, but report multiple values, so
changed MetricsCapture/MetricsContainer to support this, by writing to
an output array (and transposing the storage in MetricsContainer).
Initially, this CL would have used a single LongArray(size =
measureCount * metricCount), but this caused warmup measruments of an
empty measureRepeated block to go from 75ns to 400+ns on a Bramble
running API 30 in BenchmarkStateConfigTest.
Trivial benchmarks seem to show no noticable increase, but it's
possible this causes a small regression in extremely fast/trivial
benchmarks. If it does turn out to be impactful, we could have a
special optimized path for time capture (capture at end of start,
don't pass to MetricCapture, and handle pausing directly within
MetricsContainer).
Change-Id: Ifdf52098ccb8405a012166648c5bbd9ba3cf1f21
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricCaptureTest.kt
A benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricsContainerTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricCapture.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricsContainer.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MicrobenchmarkPhase.kt
https://android-review.googlesource.com/2625090
Branch: androidx-main
commit 4c1ee5848fbf8167493db0a289a71aed1f0d15ff
Author: Chris Craik <ccraik@google.com>
Date: Tue Jun 13 11:39:25 2023
Support for micro metrics to report multiple values
Test: MetricsContainerTest
Test: TrivialKotlinBenchmark
Bug: 286306579
Counters should start/stop together, but report multiple values, so
changed MetricsCapture/MetricsContainer to support this, by writing to
an output array (and transposing the storage in MetricsContainer).
Initially, this CL would have used a single LongArray(size =
measureCount * metricCount), but this caused warmup measruments of an
empty measureRepeated block to go from 75ns to 400+ns on a Bramble
running API 30 in BenchmarkStateConfigTest.
Trivial benchmarks seem to show no noticable increase, but it's
possible this causes a small regression in extremely fast/trivial
benchmarks. If it does turn out to be impactful, we could have a
special optimized path for time capture (capture at end of start,
don't pass to MetricCapture, and handle pausing directly within
MetricsContainer).
Change-Id: Ifdf52098ccb8405a012166648c5bbd9ba3cf1f21
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricCaptureTest.kt
A benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricsContainerTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricCapture.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricsContainer.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MicrobenchmarkPhase.kt
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit 6a2d90e57ebe9de586b19f195a386229bffb9dc1
Author: Chris Craik <ccraik@google.com>
Date: Wed Jun 14 11:12:30 2023
Single output code for micro/macro studio metric and trace output
Bug: 227205461
Bug: 286306579
Bug: 285912360
Test: ./gradlew bench:b-c:cC
Test: ./gradlew bench:b-m:cC
Test: Micro, macro, and BP tests show correctly in Studio
Relnote: "Fix warnings to always be printed in Benchmark output in
Studio, and workaround leading whitespaces from Benchmark output not
showing up in Studio"
Unify ide output codepath for all benchmark/bp/tracerule code.
This is a necessary prerequisite for outputting additional metrics
from microbench, such as counters or trace metrics, so that when
additional metrics are included, they'll automatically show up.
This is also a necessary prerequisite for linking profiling traces
from macro in Studio.
This also fixed a couple long standing issues:
* Fixes warnings only going to one of the Studio v1/v2 string pair.
* Works around Studio swallowing leading whitespace by left aligning
macro metric names
Change-Id: Ia61d0fdc52ca0de2ece777ea6dd76bc77876fcf2
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/InstrumentationResultsTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/InstrumentationResults.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-junit4/src/main/java/androidx/benchmark/junit4/PerfettoTraceRule.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/FileLinkingRule.kt
D benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/IdeSummaryStringTest.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/BaselineProfiles.kt
D benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/IdeSummaryString.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
https://android-review.googlesource.com/2634034
Branch: androidx-main
commit 6a2d90e57ebe9de586b19f195a386229bffb9dc1
Author: Chris Craik <ccraik@google.com>
Date: Wed Jun 14 11:12:30 2023
Single output code for micro/macro studio metric and trace output
Bug: 227205461
Bug: 286306579
Bug: 285912360
Test: ./gradlew bench:b-c:cC
Test: ./gradlew bench:b-m:cC
Test: Micro, macro, and BP tests show correctly in Studio
Relnote: "Fix warnings to always be printed in Benchmark output in
Studio, and workaround leading whitespaces from Benchmark output not
showing up in Studio"
Unify ide output codepath for all benchmark/bp/tracerule code.
This is a necessary prerequisite for outputting additional metrics
from microbench, such as counters or trace metrics, so that when
additional metrics are included, they'll automatically show up.
This is also a necessary prerequisite for linking profiling traces
from macro in Studio.
This also fixed a couple long standing issues:
* Fixes warnings only going to one of the Studio v1/v2 string pair.
* Works around Studio swallowing leading whitespace by left aligning
macro metric names
Change-Id: Ia61d0fdc52ca0de2ece777ea6dd76bc77876fcf2
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/InstrumentationResultsTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/InstrumentationResults.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-junit4/src/main/java/androidx/benchmark/junit4/PerfettoTraceRule.kt
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/FileLinkingRule.kt
D benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/IdeSummaryStringTest.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/BaselineProfiles.kt
D benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/IdeSummaryString.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
commit f32334a2f282467d49820319b94948ad80ac3768
Author: Chris Craik <ccraik@google.com>
Date: Wed Jun 21 15:20:13 2023
Add CpuEventCounters to microbenchmarks behind flag, root required
Test: CpuEventCounterTest
Test: TrivialKotlinBenchmark
Test: PerfettoOverheadBenchmark
Test: SynchronizedBenchmark
Test: CpuEventCounterBenchmark
Test: LazyListScrollingBenchmark
Bug: 286306579
Also improves warmup to use repeat duration directly, instead of
bypassing pause during warmup, since this was necessary to avoid
`measureRepeated { runWithTimingDisabled {} }` from taking an
extremely long time. What would happen is that the loop would take
e.g. 10ns during warmup, and say 2000ns during the actual run, since
starting/stopping counters is non-trivial. This would mean that
warmupManager would overshoot the target duration by 20x, since it
wasn't accounting for the true cost of pausing/resuming. Now, warmup
much more closely matches timing, which also helps us avoid hitting
cold code suddenly.
Set flags like the following:
```
testInstrumentationRunnerArguments["androidx.benchmark.cpuEventCounters.enable"]= 'true'
testInstrumentationRunnerArguments["androidx.benchmark.cpuEventCounters.timingPhaseMask"]= 'Instructions,CpuCycles'
```
Example output:
PerfettoOverheadBenchmark.traceBeginEnd
timeNs min 1,495.7, median 1,511.2, max 1,620.2
Instructions min 3,845.0, median 3,845.0, max 4,007.1
CpuCycles min 1,635.5, median 1,642.2, max 1,817.4
allocationCount min 0.0, median 0.0, max 0.0
PerfettoSdkOverheadBenchmark.traceBeginEnd_perfettoSdkTrace
timeNs min 580.8, median 585.4, max 653.6
Instructions min 3,830.6, median 3,959.1, max 3,969.1
CpuCycles min 1,642.3, median 1,650.5, max 1,668.8
allocationCount min 0.0, median 0.0, max 0.0
LazyListScrollingBenchmark.scrollProgrammatically_newItemComposed[LazyColumn]
timeNs min 273,686.5, median 275,024.7, max 364,566.3
Instructions min 642,749.5, median 642,837.1, max 683,841.6
CpuCycles min 706,229.0, median 709,797.1, max 808,859.2
allocationCount min 490.3, median 490.3, max 490.4
Change-Id: Ic938690476296899f058271ed56dfc3ee95aa2cf
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateConfigTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/CpuEventCounterTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuEventCounter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricCapture.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricsContainer.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MicrobenchmarkPhase.kt
D benchmark/benchmark/src/androidTest/java/androidx/benchmark/benchmark/CpuCounterBenchmark.kt
A benchmark/benchmark/src/androidTest/java/androidx/benchmark/benchmark/CpuEventCounterBenchmark.kt
https://android-review.googlesource.com/2634235
Branch: androidx-main
commit f32334a2f282467d49820319b94948ad80ac3768
Author: Chris Craik <ccraik@google.com>
Date: Wed Jun 21 15:20:13 2023
Add CpuEventCounters to microbenchmarks behind flag, root required
Test: CpuEventCounterTest
Test: TrivialKotlinBenchmark
Test: PerfettoOverheadBenchmark
Test: SynchronizedBenchmark
Test: CpuEventCounterBenchmark
Test: LazyListScrollingBenchmark
Bug: 286306579
Also improves warmup to use repeat duration directly, instead of
bypassing pause during warmup, since this was necessary to avoid
`measureRepeated { runWithTimingDisabled {} }` from taking an
extremely long time. What would happen is that the loop would take
e.g. 10ns during warmup, and say 2000ns during the actual run, since
starting/stopping counters is non-trivial. This would mean that
warmupManager would overshoot the target duration by 20x, since it
wasn't accounting for the true cost of pausing/resuming. Now, warmup
much more closely matches timing, which also helps us avoid hitting
cold code suddenly.
Set flags like the following:
```
testInstrumentationRunnerArguments["androidx.benchmark.cpuEventCounters.enable"]= 'true'
testInstrumentationRunnerArguments["androidx.benchmark.cpuEventCounters.timingPhaseMask"]= 'Instructions,CpuCycles'
```
Example output:
PerfettoOverheadBenchmark.traceBeginEnd
timeNs min 1,495.7, median 1,511.2, max 1,620.2
Instructions min 3,845.0, median 3,845.0, max 4,007.1
CpuCycles min 1,635.5, median 1,642.2, max 1,817.4
allocationCount min 0.0, median 0.0, max 0.0
PerfettoSdkOverheadBenchmark.traceBeginEnd_perfettoSdkTrace
timeNs min 580.8, median 585.4, max 653.6
Instructions min 3,830.6, median 3,959.1, max 3,969.1
CpuCycles min 1,642.3, median 1,650.5, max 1,668.8
allocationCount min 0.0, median 0.0, max 0.0
LazyListScrollingBenchmark.scrollProgrammatically_newItemComposed[LazyColumn]
timeNs min 273,686.5, median 275,024.7, max 364,566.3
Instructions min 642,749.5, median 642,837.1, max 683,841.6
CpuCycles min 706,229.0, median 709,797.1, max 808,859.2
allocationCount min 490.3, median 490.3, max 490.4
Change-Id: Ic938690476296899f058271ed56dfc3ee95aa2cf
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateConfigTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/CpuEventCounterTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuEventCounter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricCapture.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricsContainer.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MicrobenchmarkPhase.kt
D benchmark/benchmark/src/androidTest/java/androidx/benchmark/benchmark/CpuCounterBenchmark.kt
A benchmark/benchmark/src/androidTest/java/androidx/benchmark/benchmark/CpuEventCounterBenchmark.kt
ma...@google.com <ma...@google.com>
na...@google.com <na...@google.com> #10
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-common:1.2.0-beta01
androidx.benchmark:benchmark-junit4:1.2.0-beta01
androidx.benchmark:benchmark-macro:1.2.0-beta01
cc...@google.com <cc...@google.com>
cc...@google.com <cc...@google.com> #11
Over to Marcello to enable this in CI
ap...@google.com <ap...@google.com> #12
Project: platform/frameworks/support
Branch: androidx-main
commit 3383ab2cbccb3015549fb91a945678310e75f625
Author: Marcello Albano <maralb@google.com>
Date: Tue Oct 17 14:51:39 2023
Fixed tests and added measure api to CpuEventCounter
Bug: 286306579
Test: existing
Change-Id: Ia2bf481ae6e7e2f95e5b3727bb6686eafb3ba5a6
M buildSrc-tests/src/test/java/androidx/build/testConfiguration/AndroidTestConfigBuilderTest.kt
M buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/AndroidTestConfigBuilder.kt
https://android-review.googlesource.com/2795174
Branch: androidx-main
commit 3383ab2cbccb3015549fb91a945678310e75f625
Author: Marcello Albano <maralb@google.com>
Date: Tue Oct 17 14:51:39 2023
Fixed tests and added measure api to CpuEventCounter
Bug: 286306579
Test: existing
Change-Id: Ia2bf481ae6e7e2f95e5b3727bb6686eafb3ba5a6
M buildSrc-tests/src/test/java/androidx/build/testConfiguration/AndroidTestConfigBuilderTest.kt
M buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/AndroidTestConfigBuilder.kt
ap...@google.com <ap...@google.com> #13
Project: platform/frameworks/support
Branch: androidx-main
commit e52411023650ad95306ddf4db1dd3b757cb39348
Author: Marcello Albano <maralb@google.com>
Date: Tue Oct 24 10:13:35 2023
Fixed name in cpu counter events
To be consistent we want all the cpu counter event names to be camel
case.
Bug: 286306579
Test: existing
Change-Id: Id6642294c3884047166a28b738ee53f9444080a6
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricNameUtils.kt
https://android-review.googlesource.com/2800260
Branch: androidx-main
commit e52411023650ad95306ddf4db1dd3b757cb39348
Author: Marcello Albano <maralb@google.com>
Date: Tue Oct 24 10:13:35 2023
Fixed name in cpu counter events
To be consistent we want all the cpu counter event names to be camel
case.
Bug: 286306579
Test: existing
Change-Id: Id6642294c3884047166a28b738ee53f9444080a6
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricNameUtils.kt
ma...@google.com <ma...@google.com> #15
CI integration had to be reverted because of
It seems that all the benchmarks are slowing down because of enabling the cpu counters.
cc...@google.com <cc...@google.com>
ap...@google.com <ap...@google.com> #16
Project: platform/frameworks/support
Branch: androidx-main
commit 5de09686debf78730da51df37c78f91e77d3dbc5
Author: Chris Craik <ccraik@google.com>
Date: Fri Jul 26 15:30:55 2024
Fix pause/resume ordering to preserve metric priority
Test: MetricsContainerTest#validatePriorityOrder
Bug: 286306579
Bug: 307445225
Relnote: "Fix resumeTiming/runWithTimingDisabled to respect metric
priority order, and significantly reduce impact of lower priority
metric pause/resume on higher priority metric results. For example, if
using cpu perf counters via `cpuEventCounter.enable` instrumentation
argument, timeNs is no longer significantly reduced when pause/resume
occur."
Drastically reduces impact of perf event counters on timeNs measurements
-- Baseline, perf counters disabled -- (here and below running on mokey 32 bit, jit disabled)
136,714 ns 11 allocs Trace LazyListScrollingBenchmark.drawAfterScroll_newItemComposed[LazyColumn]
-- Before Change, perf counters enabled --
LazyListScrollingBenchmark.drawAfterScroll_newItemComposed[LazyColumn]
timeNs min 172,242.6, median 185,443.2, max 216,688.5
Instructions min 87,728.2, median 88,600.8, max 93,946.2
CpuCycles min 145,951.4, median 151,045.5, max 174,344.5
allocationCount min 11.0, median 11.0, max 11.0
-- After Change, perf counters enabled --
LazyListScrollingBenchmark.drawAfterScroll_newItemComposed[LazyColumn]
timeNs min 140,890.3, median 149,411.4, max 199,267.2
Instructions min 87,940.5, median 89,342.1, max 95,317.8
CpuCycles min 146,792.6, median 152,793.3, max 180,540.3
allocationCount min 11.0, median 11.0, max 11.0
Change-Id: I39c2eb911129927972740d074ee8f2adca7bda1a
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricsContainerTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricsContainer.kt
https://android-review.googlesource.com/3197014
Branch: androidx-main
commit 5de09686debf78730da51df37c78f91e77d3dbc5
Author: Chris Craik <ccraik@google.com>
Date: Fri Jul 26 15:30:55 2024
Fix pause/resume ordering to preserve metric priority
Test: MetricsContainerTest#validatePriorityOrder
Bug: 286306579
Bug: 307445225
Relnote: "Fix resumeTiming/runWithTimingDisabled to respect metric
priority order, and significantly reduce impact of lower priority
metric pause/resume on higher priority metric results. For example, if
using cpu perf counters via `cpuEventCounter.enable` instrumentation
argument, timeNs is no longer significantly reduced when pause/resume
occur."
Drastically reduces impact of perf event counters on timeNs measurements
-- Baseline, perf counters disabled -- (here and below running on mokey 32 bit, jit disabled)
136,714 ns 11 allocs Trace LazyListScrollingBenchmark.drawAfterScroll_newItemComposed[LazyColumn]
-- Before Change, perf counters enabled --
LazyListScrollingBenchmark.drawAfterScroll_newItemComposed[LazyColumn]
timeNs min 172,242.6, median 185,443.2, max 216,688.5
Instructions min 87,728.2, median 88,600.8, max 93,946.2
CpuCycles min 145,951.4, median 151,045.5, max 174,344.5
allocationCount min 11.0, median 11.0, max 11.0
-- After Change, perf counters enabled --
LazyListScrollingBenchmark.drawAfterScroll_newItemComposed[LazyColumn]
timeNs min 140,890.3, median 149,411.4, max 199,267.2
Instructions min 87,940.5, median 89,342.1, max 95,317.8
CpuCycles min 146,792.6, median 152,793.3, max 180,540.3
allocationCount min 11.0, median 11.0, max 11.0
Change-Id: I39c2eb911129927972740d074ee8f2adca7bda1a
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricsContainerTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricsContainer.kt
ap...@google.com <ap...@google.com> #17
Project: platform/frameworks/support
Branch: androidx-main
commit 06edd596b9ced3114159059ba176c7ec173fc51d
Author: Chris Craik <ccraik@google.com>
Date: Fri Jul 26 15:46:39 2024
Fix corrupted counter outputs by fixing flag caching
Bug: 286306579
Test: MetricCaptureTest#cpuEventCounterCapture_multi
Relnote: "Fix `androidx.benchmark.cpuEventCounter` producing corrupt
values for non-Instruction events"
Previously, running multiple benchmarks in a row with cpu event
counters would oly capture Instructions after the first benchmark,
with garbage values for the rest. This was caused by improper caching
of flags above the native layer. Moved the cache to a lower level to
avoid this problem.
Also moves the DEFAULT_METRICS definition inline to avoid a class init
ordering problem in tests, which further avoids this problem by not
caching a used CounterCapture instance across multiple tests
Change-Id: I7386abe3494b2b11a2447fa85a4109613857c28c
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricCaptureTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuEventCounter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricCapture.kt
https://android-review.googlesource.com/3197015
Branch: androidx-main
commit 06edd596b9ced3114159059ba176c7ec173fc51d
Author: Chris Craik <ccraik@google.com>
Date: Fri Jul 26 15:46:39 2024
Fix corrupted counter outputs by fixing flag caching
Bug: 286306579
Test: MetricCaptureTest#cpuEventCounterCapture_multi
Relnote: "Fix `androidx.benchmark.cpuEventCounter` producing corrupt
values for non-Instruction events"
Previously, running multiple benchmarks in a row with cpu event
counters would oly capture Instructions after the first benchmark,
with garbage values for the rest. This was caused by improper caching
of flags above the native layer. Moved the cache to a lower level to
avoid this problem.
Also moves the DEFAULT_METRICS definition inline to avoid a class init
ordering problem in tests, which further avoids this problem by not
caching a used CounterCapture instance across multiple tests
Change-Id: I7386abe3494b2b11a2447fa85a4109613857c28c
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricCaptureTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuEventCounter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricCapture.kt
cc...@google.com <cc...@google.com> #18
Remaining work (moved to 1.4 hotlist):
- Renaming counters to be
camelCase
- Fixing API 28 permission errors, which failed in ABTD
- Enabling for AndroidX in CI
- Experimental public MetricCapture API (with simplified lifecycle)
ap...@google.com <ap...@google.com> #19
Project: platform/frameworks/support
Branch: androidx-main
commit 0df5a6108af99875485daacf7c7c82680fe2eeaa
Author: Chris Craik <ccraik@google.com>
Date: Wed Jul 31 14:11:24 2024
Use camelCase for cpu event counter metrics
Bug: 286306579
Test: cpuEventCounterCapture_outputName
This was already done for instrumentation arg output, this change
makes it consistent across Studio and JSON as well.
Also switches to fixed Locale so test device locale doesn't affect
test output formatting.
Change-Id: I9d74f0327536866b54605b2ed2f61d4c04c468f3
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricCaptureTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuEventCounter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricCapture.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricNameUtils.kt
https://android-review.googlesource.com/3204974
Branch: androidx-main
commit 0df5a6108af99875485daacf7c7c82680fe2eeaa
Author: Chris Craik <ccraik@google.com>
Date: Wed Jul 31 14:11:24 2024
Use camelCase for cpu event counter metrics
Bug: 286306579
Test: cpuEventCounterCapture_outputName
This was already done for instrumentation arg output, this change
makes it consistent across Studio and JSON as well.
Also switches to fixed Locale so test device locale doesn't affect
test output formatting.
Change-Id: I9d74f0327536866b54605b2ed2f61d4c04c468f3
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/MetricCaptureTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuEventCounter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricCapture.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/MetricNameUtils.kt
ap...@google.com <ap...@google.com> #20
Project: platform/frameworks/support
Branch: androidx-main
commit 2550048909d02279f8a0e759e7c21dabab35f93a
Author: Chris Craik <ccraik@google.com>
Date: Thu Aug 01 15:48:29 2024
Change perf event enable logic to run on API 23+
Test: Tested on API 23, 27, 28, all of which needed this change (Unable to get access to a lower API physical device at the moment)
Bug: 286306579
Bug: 357101113
Change-Id: I283018817556b18cbedb77e11a3c95916e3c7ed3
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/CpuEventCounterTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuEventCounter.kt
https://android-review.googlesource.com/3204894
Branch: androidx-main
commit 2550048909d02279f8a0e759e7c21dabab35f93a
Author: Chris Craik <ccraik@google.com>
Date: Thu Aug 01 15:48:29 2024
Change perf event enable logic to run on API 23+
Test: Tested on API 23, 27, 28, all of which needed this change (Unable to get access to a lower API physical device at the moment)
Bug: 286306579
Bug: 357101113
Change-Id: I283018817556b18cbedb77e11a3c95916e3c7ed3
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/CpuEventCounterTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/CpuEventCounter.kt
ap...@google.com <ap...@google.com> #21
Project: platform/frameworks/support
Branch: androidx-main
commit 992cb25c28026d5f259edb7459f6d7c6be43ce34
Author: Chris Craik <ccraik@google.com>
Date: Fri Jul 26 15:59:45 2024
Reapply "Fixed tests and added measure api to CpuEventCounter"
Bug: 286306579
Bug: 307445225
Test: AndroidTestConfigBuilderTest
Reenables microbenchmark cpu counters in CI, now that intrusiveness
has been addressed.
This reverts commit 698248c877020adb675fd30becc55551e8ffc281.
Change-Id: I024f82907805d54eaf98c9233c1766e79a1b5dfd
M buildSrc-tests/src/test/java/androidx/build/testConfiguration/AndroidTestConfigBuilderTest.kt
M buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/AndroidTestConfigBuilder.kt
https://android-review.googlesource.com/3195021
Branch: androidx-main
commit 992cb25c28026d5f259edb7459f6d7c6be43ce34
Author: Chris Craik <ccraik@google.com>
Date: Fri Jul 26 15:59:45 2024
Reapply "Fixed tests and added measure api to CpuEventCounter"
Bug: 286306579
Bug: 307445225
Test: AndroidTestConfigBuilderTest
Reenables microbenchmark cpu counters in CI, now that intrusiveness
has been addressed.
This reverts commit 698248c877020adb675fd30becc55551e8ffc281.
Change-Id: I024f82907805d54eaf98c9233c1766e79a1b5dfd
M buildSrc-tests/src/test/java/androidx/build/testConfiguration/AndroidTestConfigBuilderTest.kt
M buildSrc/private/src/main/kotlin/androidx/build/testConfiguration/AndroidTestConfigBuilder.kt
cc...@google.com <cc...@google.com> #22
Punting the last bit to 1.5:
- Experimental public MetricCapture API (with simplified lifecycle)
Description
Planning to take code from Filament's Profiler.