proxygen
|
#include <chrono>
#include <condition_variable>
#include <mutex>
#include <string>
#include <thread>
#include <folly/Conv.h>
#include <folly/logging/RateLimiter.h>
#include <folly/portability/GTest.h>
Go to the source code of this file.
Typedefs | |
using | irl_clock = IntervalRateLimiter::clock |
Functions | |
void | intervalTest (uint64_t eventsPerInterval, irl_clock::duration interval) |
TEST (RateLimiter, interval3per100ms) | |
TEST (RateLimiter, interval1per100ms) | |
TEST (RateLimiter, interval15per150ms) | |
TEST (RateLimiter, concurrentThreads) | |
using irl_clock = IntervalRateLimiter::clock |
Definition at line 31 of file RateLimiterTest.cpp.
void intervalTest | ( | uint64_t | eventsPerInterval, |
irl_clock::duration | interval | ||
) |
Definition at line 33 of file RateLimiterTest.cpp.
References count, EXPECT_FALSE, EXPECT_TRUE, now(), SCOPED_TRACE, and uint64_t.
Referenced by TEST().
TEST | ( | RateLimiter | , |
interval3per100ms | |||
) |
Definition at line 62 of file RateLimiterTest.cpp.
References intervalTest().
TEST | ( | RateLimiter | , |
interval1per100ms | |||
) |
Definition at line 66 of file RateLimiterTest.cpp.
References intervalTest().
TEST | ( | RateLimiter | , |
interval15per150ms | |||
) |
Definition at line 70 of file RateLimiterTest.cpp.
References intervalTest().
TEST | ( | RateLimiter | , |
concurrentThreads | |||
) |
Definition at line 74 of file RateLimiterTest.cpp.
References count, EXPECT_EQ, folly::detail::lock(), m, mutex, s, threads, and uint64_t.