Skip to content
Commit 7156c61c authored by Arthur Eubanks's avatar Arthur Eubanks
Browse files

Wait for target package MessageQueue empty before continuing

By using Looper.myQueue().addIdleHandler(), the variance for perf tests
decreases dramatically.

Before:
registeredBroadcast_mean=12162588
registeredBroadcast_median=9496511
registeredBroadcast_stddev=10821157
manifestBroadcastRunning_mean=16673251
manifestBroadcastRunning_median=11859325
manifestBroadcastRunning_stddev=13329366
manifestBroadcastNotRunning_mean=59187569
manifestBroadcastNotRunning_median=55761932
manifestBroadcastNotRunning_stddev=14805616

Now:
registeredBroadcast_mean=940791
registeredBroadcast_median=889583
registeredBroadcast_stddev=157170
manifestBroadcastRunning_mean=1396281
manifestBroadcastRunning_median=1364531
manifestBroadcastRunning_stddev=189226
manifestBroadcastNotRunning_mean=59161472
manifestBroadcastNotRunning_median=56538781
manifestBroadcastNotRunning_stddev=14414728

Test: m ActivityManagerPerfTestsTestApp ActivityManagerPerfTests
Test: adb install \
$OUT/data/app/ActivityManagerPerfTestsTestApp/ActivityManagerPerfTestsTestApp.apk
Test: adb install \
$OUT/data/app/ActivityManagerPerfTests/ActivityManagerPerfTests.apk
Test: adb shell am instrument -w
com.android.frameworks.perftests.amtests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I05714294c53f3d013a080dfaa617e1fc92fd14e0
parent d205cde5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment