// info.enabled = false, so no limit
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
auto time = ceph::coarse_real_clock::now();
std::string key = "uuser123";
// check that request is being rejected because there are not enough tokens
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_read_ops = 1;
// check that giveback is working fine
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_read_ops = 1;
// check that tokens are being filled properly
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_read_ops = 1;
// check that a newer request is rejected if there is no enough tokens (bw)
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_read_bytes = 1;
// check that when there are enough tokens (bw) the request is still being served
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_read_bytes = 2;
// check that the bandwidth debt is not larger than 120 seconds
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_read_bytes = 2;
// check that high read bytes limit, does not affect ops limit
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_read_ops = 1;
// read limit does not affect writes
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_read_ops = 1;
// write limit does not affect reads
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_write_ops = 1;
// 0 values in RGWRateLimitInfo should allow unlimited access
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
auto time = ceph::coarse_real_clock::now();
// check that LIST op is being rejected because there are not enough tokens
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// check that giveback is working for LIST ops
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// check that tokens are being filled properly for LIST ops
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// list limit does not affect reads
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// read limit does not affect lists
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// list limit does not affect writes
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// write limit does not affect lists
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// list limit does not affect deletes
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// delete limit does not affect lists
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// check that DELIMITER op is being rejected because there are not enough tokens
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// check that giveback is working for DELIMITER ops
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// check that tokens are being filled properly for DELIMITER ops
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// check that PREFIX op is being rejected because there are not enough tokens
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// check that giveback is working for PREFIX ops
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// check that tokens are being filled properly for PREFIX ops
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_list_ops = 1;
// check that DELETE op is being rejected because there are not enough tokens
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_delete_ops = 1;
// check that giveback is working for DELETE ops
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_delete_ops = 1;
// check that tokens are being filled properly for DELETE ops
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_delete_ops = 1;
// delete limit does not affect reads
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_delete_ops = 1;
// read limit does not affect deletes
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_delete_ops = 1;
// write limit does not affect deletes
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_delete_ops = 1;
// delete limit does not affect writes
std::atomic_bool replacing;
std::condition_variable cv;
- RateLimiter ratelimit(replacing, cv);
+ RateLimiter ratelimit(g_ceph_context, replacing, cv);
RGWRateLimitInfo info;
info.enabled = true;
info.max_delete_ops = 1;