MCPcopy Create free account
hub / github.com/apache/brpc / ResetSampleWindow

Method ResetSampleWindow

src/brpc/policy/auto_concurrency_limiter.cpp:209–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209void AutoConcurrencyLimiter::ResetSampleWindow(int64_t sampling_time_us) {
210 _total_succ_req.exchange(0, butil::memory_order_relaxed);
211 _sw.start_time_us = sampling_time_us;
212 _sw.succ_count = 0;
213 _sw.failed_count = 0;
214 _sw.total_failed_us = 0;
215 _sw.total_succ_us = 0;
216}
217
218void AutoConcurrencyLimiter::UpdateMinLatency(int64_t latency_us) {
219 const double ema_factor = FLAGS_auto_cl_alpha_factor_for_ema;

Callers 1

TESTFunction · 0.45

Calls 1

exchangeMethod · 0.45

Tested by 1

TESTFunction · 0.36