Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit f77729e0a8f12090e7cc26617034eb968f4dcd80
Author: Chris Craik <ccraik@google.com>
Date: Thu Jul 15 14:55:19 2021
Reduce sleep waiting for perfetto to be killed
Fixes: 193723768
Relnote: """Drastically reduced retry polling speed when stopping
tracing, which can reduce e.g. startup benchmark runtime by 30+%"""
Test: TrivialStartupBenchmark
Killing perfetto takes somewhere on the order of 10s of ms, but we
were waiting 5 full seconds if it didn't die immediately (which was
true approximately 50% of the time, though it depends on
circumstances).
Improved TrivialStartupBenchmark from 2m18s -> 1m35s, a 31% reduction
in runtime. (Bramble running R)
Conservatively increased max retry count, though in practice never saw
two retries in a row, even with 100ms timeout.
Change-Id: Idfbc18c4c997d2d78292b14a44d405d11fe7b43e
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/PerfettoHelper.kt
https://android-review.googlesource.com/1768972
Branch: androidx-main
commit f77729e0a8f12090e7cc26617034eb968f4dcd80
Author: Chris Craik <ccraik@google.com>
Date: Thu Jul 15 14:55:19 2021
Reduce sleep waiting for perfetto to be killed
Fixes: 193723768
Relnote: """Drastically reduced retry polling speed when stopping
tracing, which can reduce e.g. startup benchmark runtime by 30+%"""
Test: TrivialStartupBenchmark
Killing perfetto takes somewhere on the order of 10s of ms, but we
were waiting 5 full seconds if it didn't die immediately (which was
true approximately 50% of the time, though it depends on
circumstances).
Improved TrivialStartupBenchmark from 2m18s -> 1m35s, a 31% reduction
in runtime. (Bramble running R)
Conservatively increased max retry count, though in practice never saw
two retries in a row, even with 100ms timeout.
Change-Id: Idfbc18c4c997d2d78292b14a44d405d11fe7b43e
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/PerfettoHelper.kt
Description
Most of the time, the 5 second timeout for perfetto stop retry fires.
I added some very simple time logging (since we can't take a perfetto trace) to macrobenchmark, and found stopping the perfetto trace takes upwards of 5 seconds much of the time. Sample logs from local change: