commit | 4bee7e4edb3f532f5064ab6378b6a0437f83ea62 | [log] [tgz] |
---|---|---|
author | Hugo Benichi <hugobenichi@google.com> | Tue Oct 18 08:43:30 2016 +0900 |
committer | Lorenzo Colitti <lorenzo@google.com> | Thu Jan 26 18:51:33 2017 +0900 |
tree | 02ba9b2d3fd941409ca89e2b1d729daed1c8d40d | |
parent | 728842ad4722ff25c810766d71ac43b9a75a6692 [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 (cherry picked from commit 998493f0ee39ae0e9ffdea27f48f1b11b0807fcb) Change-Id: I4012ae6d02f7004bceee9a2ba03914f2a2506031