Update BlobStorePerfTests test config.

As part of bringing up these tests in Cystalball,
use Collector helper library to wait for device to stabilize
before running the test.

Bug: 163826419
Test: atest BlobStorePerfTests
Change-Id: Iad31b9e0a5b1f17f83499984f41e39118d8cc153
diff --git a/apct-tests/perftests/blobstore/Android.bp b/apct-tests/perftests/blobstore/Android.bp
index be5072c..be700a2 100644
--- a/apct-tests/perftests/blobstore/Android.bp
+++ b/apct-tests/perftests/blobstore/Android.bp
@@ -21,6 +21,7 @@
     "androidx.annotation_annotation",
     "apct-perftests-utils",
     "ub-uiautomator",
+    "collector-device-lib-platform",
   ],
   platform_apis: true,
   test_suites: ["device-tests"],
diff --git a/apct-tests/perftests/blobstore/AndroidTest.xml b/apct-tests/perftests/blobstore/AndroidTest.xml
index 19456c6..58761d0 100644
--- a/apct-tests/perftests/blobstore/AndroidTest.xml
+++ b/apct-tests/perftests/blobstore/AndroidTest.xml
@@ -24,5 +24,22 @@
     <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="com.android.perftests.blob" />
         <option name="hidden-api-checks" value="false"/>
+
+        <!-- TODO: Add PerfettoListener to automatically capture perfetto traces for each test-->
+        <!-- Listener related args for collecting the traces and waiting for the device
+             to stabilize. -->
+        <option name="device-listeners"
+                value="android.device.collectors.ProcLoadListener" />
+        <!-- Guarantee that user defined RunListeners will be running before any of the default
+             listeners defined in this runner. -->
+        <option name="instrumentation-arg" key="newRunListenerMode" value="true" />
+
+        <!-- ProcLoadListener related arguments -->
+        <!-- Wait for device last minute threshold to reach 3 with 2 minute timeout before
+             starting the test run -->
+        <option name="instrumentation-arg" key="procload-collector:per_run" value="true" />
+        <option name="instrumentation-arg" key="proc-loadavg-threshold" value="3" />
+        <option name="instrumentation-arg" key="proc-loadavg-timeout" value="120000" />
+        <option name="instrumentation-arg" key="proc-loadavg-interval" value="10000" />
     </test>
 </configuration>
\ No newline at end of file