TIF: limit TvProviderPerf to 1000 channels

In testChannels: delete the channels between each insert transaction,
such that the total number of channels in the database is 1000 instead
of 100000.
In testPrograms: no change, insert 100000 programs across 100 channels.

Rationale: TvProvider handles hundreds of thousands of records
periodically, so it is desirable to have performance under a reasonable
bar. However, this is especially true for program records. Inserting
100000 channels is unrealistic and is causing a significant performance
impact on low-DMIPS devices.

bug: 117958316
Change-Id: I5b3833d047e3f123dfedb86cda639f7f18699492
(cherry picked from commit 0a8e756c160aa38671cee362b5084f3591e51eed)
diff --git a/tests/tvprovider/src/android/tvprovider/cts/TvProviderPerfTest.java b/tests/tvprovider/src/android/tvprovider/cts/TvProviderPerfTest.java
index e9c7ae0..e18df4c 100644
--- a/tests/tvprovider/src/android/tvprovider/cts/TvProviderPerfTest.java
+++ b/tests/tvprovider/src/android/tvprovider/cts/TvProviderPerfTest.java
@@ -86,6 +86,11 @@
         final int TRANSACTION_SIZE = 1000;
         double[] applyBatchTimes = MeasureTime.measure(TRANSACTION_RUNS, new MeasureRun() {
             @Override
+            public void prepare(int i) {
+                mContentResolver.delete(Channels.CONTENT_URI, null, null);
+            }
+
+            @Override
             public void run(int i) {
                 operations.clear();
                 for (int j = 0; j < TRANSACTION_SIZE; ++j) {