Add a new token-bucket backend abstraction, with tests
This differs from our previous token bucket abstraction in a few ways: 1) It is an abstraction, and not a collection of fields. 2) It is meant to be used with monotonic timestamps, which should produce better results than calling gettimeofday over and over.
Showing
- src/common/include.am 2 additions, 0 deletionssrc/common/include.am
- src/common/token_bucket.c 180 additions, 0 deletionssrc/common/token_bucket.c
- src/common/token_bucket.h 72 additions, 0 deletionssrc/common/token_bucket.h
- src/test/include.am 1 addition, 0 deletionssrc/test/include.am
- src/test/test.c 1 addition, 0 deletionssrc/test/test.c
- src/test/test.h 1 addition, 0 deletionssrc/test/test.h
- src/test/test_bwmgt.c 199 additions, 0 deletionssrc/test/test_bwmgt.c
src/common/token_bucket.c
0 → 100644
src/common/token_bucket.h
0 → 100644
src/test/test_bwmgt.c
0 → 100644
Please register or sign in to comment