commit | 05ad47add8796880c5ba18d55ab6d5221f3e708d | [log] [tgz] |
---|---|---|
author | Hugo Benichi <hugobenichi@google.com> | Tue Oct 18 08:43:30 2016 +0900 |
committer | Lorenzo Colitti <lorenzo@google.com> | Fri Dec 09 11:21:29 2016 +0900 |
tree | a0af36169a81ab5e26f9ae6e2dac578975526071 | |
parent | 8c9e4b68f09c92f7f1d26916bbac7014c45f5d49 [diff] |
DO NOT MERGE: 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 (cherry picked from commit 998493f0ee39ae0e9ffdea27f48f1b11b0807fcb) Change-Id: I4012ae6d02f7004bceee9a2ba03914f2a2506031