commit | 998493f0ee39ae0e9ffdea27f48f1b11b0807fcb | [log] [tgz] |
---|---|---|
author | Hugo Benichi <hugobenichi@google.com> | Tue Oct 18 08:43:30 2016 +0900 |
committer | Hugo Benichi <hugobenichi@google.com> | Wed Oct 19 09:48:00 2016 +0900 |
tree | a23a88d90035672cdcb4da6a8685ebe7eaa0cf49 | |
parent | daeeda35d951e9b6925a98cd0d909a59a94bd59f [diff] |
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