Synchronization between metrics logged and metrics collecting
Since the logging of the interaction jank metrics are not synchronized
with the metrics collecting in the test process, this cl let the test
process wait for metrics logged broadcast then polling the metrics we
want to make sure the correctness of metrics collecting.
Bug: 171912046
Test: atest CollectorsHelperTest:com.android.helpers.UiInteractionFrameInfoHelperTest
Test: atest
PlatformScenarioTests:android.platform.test.scenario.launcher.OpenAppFromHomeHotMicrobenchmark
-- --test-arg
com.android.tradefed.testtype.AndroidJUnitTest:device-listeners:android.device.collectors.UiInteractionFrameInfoListener
--module-arg PlatformScenarioTests:instrumentation-arg:iterations:=3
--module-arg PlatformScenarioTests:instrumentation-arg:drop-cache:=false
--module-arg PlatformScenarioTests:instrumentation-arg:kill-app:=false
Change-Id: Ief3e2459136cf82cecb214136079b3aeeef24a02
4 files changed