Home
last modified time | relevance | path

Searched refs:RateLimiter (Results 1 – 20 of 20) sorted by relevance

/packages/modules/HealthFitness/tests/unittests/src/android/health/connect/
DRateLimiterTest.java24 import android.health.connect.ratelimiter.RateLimiter;
25 import android.health.connect.ratelimiter.RateLimiter.QuotaCategory;
73 RateLimiter.updateEnableRateLimiterFlag(true); in setUp()
89 RateLimiter.clearCache(); in testTryAcquireApiCallQuota_invalidQuotaCategory()
93 RateLimiter.tryAcquireApiCallQuota(UID, quotaCategory, IS_IN_FOREGROUND_TRUE); in testTryAcquireApiCallQuota_invalidQuotaCategory()
98 RateLimiter.clearCache(); in testTryAcquireApiCallQuota_unmeteredForegroundCalls()
106 RateLimiter.clearCache(); in testTryAcquireApiCallQuota_unmeteredBackgroundCalls()
114 RateLimiter.clearCache(); in testTryAcquireApiCallQuota_meteredForegroundCallsInLimit()
122 RateLimiter.clearCache(); in testTryAcquireApiCallQuota_meteredBackgroundCallsInLimit()
130 RateLimiter.clearCache(); in testTryAcquireApiCallQuota_meteredForegroundCallsLimitExceeded()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/
DThrottler.java26 import com.google.common.util.concurrent.RateLimiter;
110 private final ConcurrentHashMap<Pair<ApiKey, String>, RateLimiter> mSdkRateLimitMap =
165 final RateLimiter rateLimiter = in tryAcquire()
231 private RateLimiter create(double permitsPerSecond) { in create()
232 RateLimiter rateLimiter = RateLimiter.create(Double.POSITIVE_INFINITY); in create()
/packages/modules/OnDevicePersonalization/federatedcompute/src/com/android/federatedcompute/services/statsd/
DFederatedComputeStatsdLogger.java26 import com.google.common.util.concurrent.RateLimiter;
31 private final RateLimiter mRateLimiter;
34 FederatedComputeStatsdLogger(RateLimiter rateLimiter) { in FederatedComputeStatsdLogger()
47 RateLimiter.create(100)); in getInstance()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/logging/
DHealthConnectServiceLoggerTest.java33 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_READS_PER_15M…
34 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_READS_PER_15M…
35 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_READS_PER_24H…
36 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_READS_PER_24H…
37 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_WRITES_PER_15…
38 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_WRITES_PER_15…
39 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_WRITES_PER_24…
40 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_WRITES_PER_24…
/packages/modules/Connectivity/staticlibs/testutils/devicetests/com/android/testutils/async/
DRateLimiter.java29 public final class RateLimiter { class
43 public RateLimiter(OsAccess osAccess, int bytesPerSecond) { in RateLimiter() method in RateLimiter
64 public static int limit(RateLimiter limiter1, RateLimiter limiter2, int requestedBytes) { in limit()
DFakeOsAccess.java247 final int allowedCopyCount = RateLimiter.limit( in copyFileBuffers()
398 remainingTimeoutMs = Math.min(RateLimiter.BUCKET_DURATION_MS, remainingTimeoutMs); in poll()
513 final RateLimiter inboundLimiter = new RateLimiter(FakeOsAccess.this, Integer.MAX_VALUE);
514 final RateLimiter outboundLimiter = new RateLimiter(FakeOsAccess.this, Integer.MAX_VALUE);
/packages/modules/OnDevicePersonalization/tests/federatedcomputetests/src/com/android/federatedcompute/services/statsd/
DFederatedComputeStatsdLoggerTest.java22 import com.google.common.util.concurrent.RateLimiter;
37 new FederatedComputeStatsdLogger(RateLimiter.create(1)); in logWithRateLimit_1QPS()
55 new FederatedComputeStatsdLogger(RateLimiter.create(3)); in logWithRateLimit_3QPS()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/logging/
DHealthConnectServiceLogger.java134 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_READS_PER_15M…
135 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_READS_PER_15M…
136 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_READS_PER_24H…
137 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_READS_PER_24H…
138 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_WRITES_PER_15…
139 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_WRITES_PER_15…
140 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_WRITES_PER_24…
141 import static android.health.connect.ratelimiter.RateLimiter.QuotaBucket.QUOTA_BUCKET_WRITES_PER_24…
147 import android.health.connect.ratelimiter.RateLimiter;
408 @RateLimiter.QuotaBucket.Type int quotaBucket, float quotaLimit) { in setRateLimit()
[all …]
/packages/modules/HealthFitness/framework/java/android/health/connect/ratelimiter/
DRateLimiterException.java24 @RateLimiter.QuotaBucket.Type private final int mQuotaBucket;
35 @RateLimiter.QuotaBucket.Type int quotaBucket, in RateLimiterException()
DRateLimiter.java42 public final class RateLimiter { class
115 RateLimiter.CHUNK_SIZE_LIMIT_IN_BYTES, in initQuotaBuckets()
118 RateLimiter.RECORD_SIZE_LIMIT_IN_BYTES, in initQuotaBuckets()
/packages/modules/Profiling/tests/cts/src/android/profiling/cts/
DProfilingServiceTests.java43 import android.os.profiling.RateLimiter;
99 private RateLimiter mRateLimiter;
107 mRateLimiter = spy(new RateLimiter(new RateLimiter.HandlerCallback() { in setUp()
285 doReturn(RateLimiter.RATE_LIMIT_RESULT_BLOCKED_PROCESS).when(mRateLimiter) in testRequestProfiling_RateLimitBlocked_Fails()
430 RateLimiter.CollectionEntry[] hourEntriesOriginal = in testRateLimiter_PersistAndRestore()
432 RateLimiter.CollectionEntry[] dayEntriesOriginal = in testRateLimiter_PersistAndRestore()
434 RateLimiter.CollectionEntry[] weekEntriesOriginal = in testRateLimiter_PersistAndRestore()
1144 private void confirmRateLimiterEntriesEqual(RateLimiter.CollectionEntry[] collectionOne, in confirmRateLimiterEntriesEqual()
1145 RateLimiter.CollectionEntry[] collectionTwo) { in confirmRateLimiterEntriesEqual()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/
DHealthConnectDeviceConfigManager.java22 import android.health.connect.ratelimiter.RateLimiter;
23 import android.health.connect.ratelimiter.RateLimiter.QuotaBucket;
505 RateLimiter.updateEnableRateLimiterFlag(mRateLimiterEnabled); in updateRateLimiterValues()
547 RateLimiter.updateEnableRateLimiterFlag(mRateLimiterEnabled); in onPropertiesChanged()
DHealthConnectManagerService.java23 import android.health.connect.ratelimiter.RateLimiter;
143 RateLimiter.clearCache(); in onUserSwitching()
DHealthConnectServiceImpl.java115 import android.health.connect.ratelimiter.RateLimiter;
116 import android.health.connect.ratelimiter.RateLimiter.QuotaCategory;
504 RateLimiter.QuotaCategory.QUOTA_CATEGORY_READ, in aggregateRecords()
1890 RateLimiter.clearCache(); in deleteAllStagedRemoteData()
1906 RateLimiter.setLowerRateLimitsForTesting(enabled); in setLowerRateLimitsForTesting()
2327 RateLimiter.tryAcquireApiCallQuota(uid, quotaCategory, isInForeground); in tryAcquireApiCallQuota()
2344 RateLimiter.tryAcquireApiCallQuota(uid, quotaCategory, isInForeground, memoryCost); in tryAcquireApiCallQuota()
2355 recordsSize.forEach(RateLimiter::checkMaxRecordMemoryUsage); in enforceMemoryRateLimit()
2356 RateLimiter.checkMaxChunkMemoryUsage(recordsChunkSize); in enforceMemoryRateLimit()
/packages/modules/Profiling/service/java/com/android/os/profiling/
DProfilingService.java101 @VisibleForTesting public RateLimiter mRateLimiter = null;
430 if (status == RateLimiter.RATE_LIMIT_RESULT_ALLOWED) { in requestProfiling()
458 RateLimiter.statusToResult(status), null, tag, null); in requestProfiling()
1321 private RateLimiter getRateLimiter() { in getRateLimiter()
1323 mRateLimiter = new RateLimiter(new RateLimiter.HandlerCallback() { in getRateLimiter()
DRateLimiter.java44 public class RateLimiter { class
45 private static final String TAG = RateLimiter.class.getSimpleName();
125 public RateLimiter(HandlerCallback handlerCallback) { in RateLimiter() method in RateLimiter
/packages/apps/TV/libs/m2/
Dguava-28.0-android.jarMETA-INF/MANIFEST.MF META-INF/ META-INF/maven/ META- ...
Dguava-28.0-jre.jarMETA-INF/MANIFEST.MF META-INF/ META-INF/maven/ META- ...
/packages/apps/ManagedProvisioning/studio-dev/StubGenerator/
DStubGenerator.jarMETA-INF/ META-INF/MANIFEST.MF org/ org/jf/ org/ ...
/packages/apps/TV/libs/
Dgoogle-java-format-1.7-all-deps.jarMETA-INF/ META-INF/MANIFEST.MF com/ com/google/ com/ ...