Fixed
Status Update
Comments
cc...@google.com <cc...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit ab01b93ac14c5cc6989089f3c1c1642d679df082
Author: Chris Craik <ccraik@google.com>
Date: Wed Apr 03 16:00:02 2024
Add profiler output files to JSON output
Fixes:332604449
Test: ResultWriterTest
Test: ./gradlew bench:b-c:cC bench:b-m:cC
Relnote: "Added profilerOutput to JSON output for easier tooling
around profiling traces (e.g. perfetto, method traces)"
Add profiler output files to JSON. Outputs are file paths relative to
the JSON file itself. If we add an option for per-test JSON files,
these will stay the same.
The ProfilerOutput vs Profiler.ResultFile layering is a bit awkward.
Over time, we'll likely want a better layering, with a intermediate
(potentially public API compatible) layer above the JSON type, similar
to the old BenchmarkResult. Benchmark tests will output that, which
can emit JSON via json.BenchmarkData, or InstrumentationResults
directly. This would simplify a lot of the result type conversions,
and remove references to json from everywhere but that top level
output type.
Change-Id: I05ddd9af8864fdb79ce076e836699b80fca864e6
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/androidTest/java/androidx/benchmark/ResultWriterTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/json/BenchmarkDataTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/ResultWriter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/json/BenchmarkData.kt
M benchmark/benchmark-junit4/src/main/java/androidx/benchmark/junit4/BenchmarkRule.kt
M benchmark/benchmark-junit4/src/main/java/androidx/benchmark/junit4/PerfettoTraceRule.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/perfetto/PerfettoTraceProcessor.kt
https://android-review.googlesource.com/3025752
Branch: androidx-main
commit ab01b93ac14c5cc6989089f3c1c1642d679df082
Author: Chris Craik <ccraik@google.com>
Date: Wed Apr 03 16:00:02 2024
Add profiler output files to JSON output
Fixes:332604449
Test: ResultWriterTest
Test: ./gradlew bench:b-c:cC bench:b-m:cC
Relnote: "Added profilerOutput to JSON output for easier tooling
around profiling traces (e.g. perfetto, method traces)"
Add profiler output files to JSON. Outputs are file paths relative to
the JSON file itself. If we add an option for per-test JSON files,
these will stay the same.
The ProfilerOutput vs Profiler.ResultFile layering is a bit awkward.
Over time, we'll likely want a better layering, with a intermediate
(potentially public API compatible) layer above the JSON type, similar
to the old BenchmarkResult. Benchmark tests will output that, which
can emit JSON via json.BenchmarkData, or InstrumentationResults
directly. This would simplify a lot of the result type conversions,
and remove references to json from everywhere but that top level
output type.
Change-Id: I05ddd9af8864fdb79ce076e836699b80fca864e6
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/androidTest/java/androidx/benchmark/ResultWriterTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/json/BenchmarkDataTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/ResultWriter.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/json/BenchmarkData.kt
M benchmark/benchmark-junit4/src/main/java/androidx/benchmark/junit4/BenchmarkRule.kt
M benchmark/benchmark-junit4/src/main/java/androidx/benchmark/junit4/PerfettoTraceRule.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Macrobenchmark.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/perfetto/PerfettoTraceProcessor.kt
na...@google.com <na...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-common:1.3.0-alpha03
androidx.benchmark:benchmark-junit4:1.3.0-alpha03
androidx.benchmark:benchmark-macro:1.3.0-alpha03
Description
No description yet.