commit | f6fdb4a55219de8b132810ad4c596ab614c009e8 | [log] [tgz] |
---|---|---|
author | Hugo Benichi <hugobenichi@google.com> | Tue Oct 18 08:43:30 2016 +0900 |
committer | Hugo Benichi <hugobenichi@google.com> | Tue Dec 13 10:20:03 2016 +0900 |
tree | 0e2c7f1b5bd291055502464b0d75c68a43130867 | |
parent | e40bb555d836b0f9e06038b2f7df27039200d164 [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: Iaf477c7bb14f8ddb293b7a907e2ab0cf76d09e07