Permalink
Commits on Oct 30, 2018
  1. Don't lie in the maintainership badge

    antifuchs committed Oct 30, 2018
    It's actively maintained, let's not kid ourselves.
  2. Add crates.io categories

    antifuchs committed Oct 30, 2018
Commits on Oct 27, 2018
  1. Don't use the failure crate

    antifuchs committed Oct 27, 2018
    It's convenient, but compilation time & complexity doesn't really
    justify having it. Implementing the Display traits myself was fairly
    cheap, so I think I'll do this instead.
Commits on Oct 26, 2018
  1. Release 4.0.1 🎉🎉

    antifuchs committed Oct 26, 2018
  2. Un-document the benchmark/test utility functions.

    antifuchs committed Oct 26, 2018
    Oops, those are not part of the public interface.
  3. Release 4.0.0 🎉🎉

    antifuchs committed Oct 26, 2018
  4. Move test_utilities crate into an undocumented module

    antifuchs committed Oct 26, 2018
    This has the same effect as the sub-crate, but should let me release
    the crate on crates.io
  5. Merge pull request #21 from antifuchs/by-key

    antifuchs committed Oct 26, 2018
    Change the interface to support by-key rate limiting
  6. Name the algorithm-construction method `construct`.

    antifuchs committed Oct 26, 2018
    params_from_constructor always was a bit badly-named. Let's fix that
    while we can.
  7. Refactor the Algorithm trait: No more BucketParams

    antifuchs committed Oct 26, 2018
    This improves the usability of algorithms quite a bit - fewer things
    to implement/document and also allows us to use them in test more
    easily.
Commits on Oct 25, 2018
  1. Rewrite tests/gcra.rs in terms of algorithms only

    antifuchs committed Oct 25, 2018
    No more unnecessary deps on DirectRateLimiter, and some more
    confidence that we're testing the right thing!
  2. Extract benchmarks' variants/algorithms stuff into a utility crate

    antifuchs committed Oct 25, 2018
    This allows us to use (at least the algorithms wrapper) in tests, too;
    pretty useful!
  3. Make use of Into<Option<T>>

    antifuchs committed Oct 25, 2018
Commits on Oct 24, 2018
  1. rustfmt it

    antifuchs committed Oct 24, 2018
  2. Add a multi-threaded benchmark for keyed rate limiters too

    antifuchs committed Oct 24, 2018
    Works the same as the single-threaded one!
  3. New benchmarks - algorithms edition

    antifuchs committed Oct 24, 2018
    * Make benches/algorithms.rs, where we test the "bare" algorithm,
      without a bucket attached.
    * Add benchmark for single-threaded direct & keyed buckets, testing
      both algorithms on each.
    * Move the no-op bench to using the bare algorithm too, and only bench
      single-element checking.
Commits on Oct 23, 2018
  1. Introduce per-algorithm error types, all implementing a trait

    antifuchs committed Oct 23, 2018
    Since each algorithm has its own way of keeping time, this allows us
    to return an error in the fastest possible way while remaining useful
    to client code: Users can still get all the useful information out of
    the negative decisions (how long to wait or the earliest instant they
    can retry), and algorithms can concentrate on being really fast.
Commits on Oct 22, 2018
  1. Use nonzero_ext's nonzero!() macro to construct nonzero parameters

    antifuchs committed Oct 22, 2018
    This is far more readable, faster, and safer too - since it's checked
    at compile time, we can be sure our code will never panic at runtime
    because I typo'd a constant.
  2. Make LeakyBucket the default rate limiting algorithm

    antifuchs committed Oct 22, 2018
    Now the interface is somewhat nicer - users only need to decide
    whether they need per-key or direct rate limiting.
  3. Implement key expiry

    antifuchs committed Oct 22, 2018
    This takes all the keys whose states are no longer relevant (i.e.,
    have been the same as a "fresh" rate limiter for a given amount of
    time), and removes them from the dictionary.
  4. Introduce RateLimitState, a trait for rate limiter state housekeeping

    antifuchs committed Oct 22, 2018
    This will allow the keyed rate limiter to track which states are
    useless & expire them out of the map.
Commits on Oct 21, 2018
  1. Destutter the various check methods a little

    antifuchs committed Oct 21, 2018
    This should dedup the code a little bit, and allow it all to look a
    bit less grody.