Merge "[SettingsProvider] perf test for null settings" into udc-dev am: aa66f40029
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21734460 Change-Id: I7d1429477aa87e1b87db4043f6fcec7078908798 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -39,6 +39,7 @@ public final class SettingsProviderPerfTest {
|
|||||||
private static final String NAMESPACE = "test@namespace";
|
private static final String NAMESPACE = "test@namespace";
|
||||||
private static final String SETTING_NAME1 = "test:setting1";
|
private static final String SETTING_NAME1 = "test:setting1";
|
||||||
private static final String SETTING_NAME2 = "test-setting2";
|
private static final String SETTING_NAME2 = "test-setting2";
|
||||||
|
private static final String UNSET_SETTING = "test_unset_setting";
|
||||||
|
|
||||||
private final ContentResolver mContentResolver;
|
private final ContentResolver mContentResolver;
|
||||||
|
|
||||||
@@ -92,6 +93,14 @@ public final class SettingsProviderPerfTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSettingsValueConsecutiveReadUnset() {
|
||||||
|
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
|
||||||
|
while (state.keepRunning()) {
|
||||||
|
Settings.Secure.getString(mContentResolver, UNSET_SETTING);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSettingsNamespaceConsecutiveRead() {
|
public void testSettingsNamespaceConsecutiveRead() {
|
||||||
final List<String> names = new ArrayList<>();
|
final List<String> names = new ArrayList<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user