Assigned
Status Update
Comments
ml...@google.com <ml...@google.com> #2
When I run Macrobenchmark via the `connectedCheck` target with info logs on, I can see the arg being set:
```
INFO: Configuring Android Instrumentation driver: android_instrumentation_runtime {
instrumentation_info {
...
args_map {
key: "androidx.benchmark.suppressErrors"
value: "DEBUGGABLE"
}
}
}
```
Attempted to pass the flag via the `-e` option to the `instrument` command of ADB, but no change to error output:
```
$ adb shell am instrument -w com.ring.benchmark/androidx.test.runner.AndroidJUnitRunner -e androidx.benchmark.suppressErrors DEBUGGABLE
...
ERROR: Benchmark Target is Debuggable
```
```
INFO: Configuring Android Instrumentation driver: android_instrumentation_runtime {
instrumentation_info {
...
args_map {
key: "androidx.benchmark.suppressErrors"
value: "DEBUGGABLE"
}
}
}
```
Attempted to pass the flag via the `-e` option to the `instrument` command of ADB, but no change to error output:
```
$ adb shell am instrument -w com.ring.benchmark/androidx.test.runner.AndroidJUnitRunner -e androidx.benchmark.suppressErrors DEBUGGABLE
...
ERROR: Benchmark Target is Debuggable
```
cc...@google.com <cc...@google.com> #3
Are you seeing a line like the following? :
ERRORS (not suppressed): ...
WARNINGS (suppressed): ...
Can you try suppressing other errors, does that work? E.g. run the macrobenchmark on an emulator, which should require adding "EMULATOR" to the suppression list, and show it as a suppressed warning.
ml...@google.com <ml...@google.com> #4
I tried this out and it worked for me - I just created a trivial test app and macrobench, test passed. Swapped to debuggable = true
in the app, it broke with the expected error, and added the testInstrumentationRunnerArguments["androidx.benchmark.suppressErrors"] = "DEBUGGABLE"
in the macrobenchmark to make it work again (now with a warning at the top).
Sample project attached.
By the way, note that any measurements you make of your debug app won't be representative of your actual release app.
Description
Component used: Macrobench 1.3.0-SNAPSHOT
If I have a
TraceSectionMetric("my_trace")
and themy_trace
occurs only in one (first?)iteration
of the macrobenchmark, the standard (non-sampled) benchmark results aren't produced properly -- it only has one item in theruns
array and not for each run.For example:
Attaching JSON results + perfetto traces for 3 iterations.