Home
last modified time | relevance | path

Searched refs:optimizeInfo (Results 1 – 14 of 14) sorted by relevance

/packages/modules/AppSearch/testing/servicestests/src/com/android/server/appsearch/
DServiceOptimizeStrategyTest.java45 GetOptimizeInfoResultProto optimizeInfo = in testShouldNotOptimize_underAllThresholds() local
55 assertThat(mServiceOptimizeStrategy.shouldOptimize(optimizeInfo)).isFalse(); in testShouldNotOptimize_underAllThresholds()
60 GetOptimizeInfoResultProto optimizeInfo = in testShouldOptimize_byteThreshold() local
70 assertThat(mServiceOptimizeStrategy.shouldOptimize(optimizeInfo)).isTrue(); in testShouldOptimize_byteThreshold()
75 GetOptimizeInfoResultProto optimizeInfo = in testShouldOptimize_timeThreshold() local
85 assertThat(mServiceOptimizeStrategy.shouldOptimize(optimizeInfo)).isTrue(); in testShouldOptimize_timeThreshold()
90 GetOptimizeInfoResultProto optimizeInfo = in testShouldOptimize_docCountThreshold() local
99 assertThat(mServiceOptimizeStrategy.shouldOptimize(optimizeInfo)).isTrue(); in testShouldOptimize_docCountThreshold()
104 GetOptimizeInfoResultProto optimizeInfo = in testShouldNotOptimize_underMinTimeThreshold() local
113 assertThat(mServiceOptimizeStrategy.shouldOptimize(optimizeInfo)).isFalse(); in testShouldNotOptimize_underMinTimeThreshold()
DAdbDumpUtilTest.java131 optimizeInfo -> true); in testDesensitizeRealDebugInfo()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/
DServiceOptimizeStrategy.java45 public boolean shouldOptimize(@NonNull GetOptimizeInfoResultProto optimizeInfo) { in shouldOptimize() argument
47 optimizeInfo.getOptimizableDocs() in shouldOptimize()
49 || optimizeInfo.getEstimatedOptimizableBytes() in shouldOptimize()
51 || optimizeInfo.getTimeSinceLastOptimizeMs() in shouldOptimize()
54 && optimizeInfo.getTimeSinceLastOptimizeMs() in shouldOptimize()
63 + optimizeInfo.getTimeSinceLastOptimizeMs() in shouldOptimize()
/packages/modules/AppSearch/testing/mockingservicestests/src/com/android/server/appsearch/
DMockingServiceOptimizeStrategyTest.java68 GetOptimizeInfoResultProto optimizeInfo = in testShouldNotOptimize_overOtherThresholds_underMinTimeThreshold() local
82 assertThat(mServiceOptimizeStrategy.shouldOptimize(optimizeInfo)).isTrue(); in testShouldNotOptimize_overOtherThresholds_underMinTimeThreshold()
94 assertThat(mServiceOptimizeStrategy.shouldOptimize(optimizeInfo)).isFalse(); in testShouldNotOptimize_overOtherThresholds_underMinTimeThreshold()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/external/localstorage/
DOptimizeStrategy.java38 boolean shouldOptimize(@NonNull GetOptimizeInfoResultProto optimizeInfo); in shouldOptimize() argument
DAppSearchImpl.java2784 GetOptimizeInfoResultProto optimizeInfo = getOptimizeInfoResultLocked(); in checkForOptimize() local
2785 checkSuccess(optimizeInfo.getStatus()); in checkForOptimize()
2787 if (mOptimizeStrategy.shouldOptimize(optimizeInfo)) { in checkForOptimize()
/packages/modules/AppSearch/testing/servicestests/src/com/android/server/appsearch/external/localstorage/visibilitystore/
DVisibilityStoreMigrationHelperFromV1Test.java53 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
DVisibilityStoreMigrationFromV2Test.java58 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
DVisibilityStoreMigrationHelperFromV0Test.java57 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
DVisibilityStoreTest.java57 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
/packages/modules/AppSearch/testing/servicestests/src/com/android/server/appsearch/external/localstorage/
DAppSearchImplTest.java111 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
506 GetOptimizeInfoResultProto optimizeInfo = mAppSearchImpl.getOptimizeInfoResultLocked(); in testTriggerCheckOptimizeByMutationSize() local
507 assertThat(optimizeInfo.getOptimizableDocs()).isEqualTo(1); in testTriggerCheckOptimizeByMutationSize()
514 optimizeInfo = mAppSearchImpl.getOptimizeInfoResultLocked(); in testTriggerCheckOptimizeByMutationSize()
515 assertThat(optimizeInfo.getOptimizableDocs()).isEqualTo(1); in testTriggerCheckOptimizeByMutationSize()
522 optimizeInfo = mAppSearchImpl.getOptimizeInfoResultLocked(); in testTriggerCheckOptimizeByMutationSize()
523 assertThat(optimizeInfo.getOptimizableDocs()).isEqualTo(0); in testTriggerCheckOptimizeByMutationSize()
524 assertThat(optimizeInfo.getEstimatedOptimizableBytes()).isEqualTo(0); in testTriggerCheckOptimizeByMutationSize()
DAppSearchLoggerTest.java70 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
/packages/modules/AppSearch/testing/servicestests/src/com/android/server/appsearch/visibilitystore/
DVisibilityCheckerImplTest.java73 private static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;
/packages/modules/AppSearch/testing/servicestests/src/com/android/server/appsearch/external/localstorage/converter/
DSearchSpecToProtoConverterTest.java65 public static final OptimizeStrategy ALWAYS_OPTIMIZE = optimizeInfo -> true;