Home
last modified time | relevance | path

Searched refs:getApiCost (Results 1 – 5 of 5) sorted by relevance

/packages/modules/AppSearch/testing/servicestests/src/com/android/server/appsearch/
DAppSearchRateLimitConfigTest.java43 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_NAMESPACES)).isEqualTo(1); in testDefaultRateLimitConfig()
44 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_SEARCH)).isEqualTo(1); in testDefaultRateLimitConfig()
45 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_STORAGE_INFO)).isEqualTo(1); in testDefaultRateLimitConfig()
46 assertThat(rateLimitConfig.getApiCost( in testDefaultRateLimitConfig()
58 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_PUT_DOCUMENTS)).isEqualTo(5); in testCustomRateLimitConfig()
59 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_DOCUMENTS)).isEqualTo(11); in testCustomRateLimitConfig()
60 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_SET_SCHEMA)).isEqualTo(99); in testCustomRateLimitConfig()
62 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_NAMESPACES)).isEqualTo(1); in testCustomRateLimitConfig()
63 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_SEARCH)).isEqualTo(1); in testCustomRateLimitConfig()
64 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_STORAGE_INFO)).isEqualTo(1); in testCustomRateLimitConfig()
[all …]
DRateLimitedExecutorTest.java50 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_PUT_DOCUMENTS)).isEqualTo(5); in testAddTaskToQueue_addOk()
51 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_DOCUMENTS)).isEqualTo(40); in testAddTaskToQueue_addOk()
52 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_SET_SCHEMA)).isEqualTo(99); in testAddTaskToQueue_addOk()
/packages/modules/AppSearch/testing/mockingservicestests/src/com/android/server/appsearch/
DServiceAppSearchConfigTest.java155 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_DOCUMENT)).isEqualTo( in testDefaultValues_allCachedValue()
157 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_NEXT_PAGE)).isEqualTo( in testDefaultValues_allCachedValue()
159 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_SET_SCHEMA)).isEqualTo( in testDefaultValues_allCachedValue()
161 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_SEARCH)).isEqualTo( in testDefaultValues_allCachedValue()
824 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_PUT_DOCUMENTS)).isEqualTo(5); in testCustomizedValueOverride_rateLimitConfig()
825 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_DOCUMENTS)).isEqualTo(11); in testCustomizedValueOverride_rateLimitConfig()
826 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_SET_SCHEMA)).isEqualTo(99); in testCustomizedValueOverride_rateLimitConfig()
828 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_GET_NAMESPACES)).isEqualTo( in testCustomizedValueOverride_rateLimitConfig()
830 assertThat(rateLimitConfig.getApiCost(CallStats.CALL_TYPE_SEARCH)).isEqualTo( in testCustomizedValueOverride_rateLimitConfig()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/util/
DRateLimitedExecutor.java139 int apiCost = mRateLimitConfigLocked.getApiCost(apiType); in addTaskToQueue()
168 int apiCost = mRateLimitConfigLocked.getApiCost(apiType); in removeTaskFromQueue()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/
DAppSearchRateLimitConfig.java138 public int getApiCost(@CallStats.CallType int apiType) { in getApiCost() method in AppSearchRateLimitConfig