History log of /frameworks/base/core/tests/coretests/src/android/util/TokenBucketTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e1c173d2240a8eedf7685c9371087dc047a6931f 18-Oct-2016 Hugo Benichi <hugobenichi@google.com> IpConnectivityMetrics: rate limit ApfProgramEvents

This patch uses the previously introduced TokenBucket to rate limit
ApfProgramEvents, still allowing for burst of ApfProgramEvents when a
new interface is set up (due to ipv4 provisioning, multicast lock, ipv6 RAs
triggering new APF program events in short amounts of time).

Test: new test in IpConnectivityMetricsTest
Bug: 1550402
Change-Id: I1a544a8d62e6b02f0ed0088ab76c4bad338d2f44
/frameworks/base/core/tests/coretests/src/android/util/TokenBucketTest.java
998493f0ee39ae0e9ffdea27f48f1b11b0807fcb 18-Oct-2016 Hugo Benichi <hugobenichi@google.com> TokenBucket for rate-limiting and throttling

This patch adds a TokenBucket class that can accumulate and distribute
tokens over time.

Test: comes with unit tests.
Bug: 32198637
Change-Id: Iefde02a0696de93fd2b2d5dc46889e29d269385e
/frameworks/base/core/tests/coretests/src/android/util/TokenBucketTest.java