MCPcopy Create free account
hub / github.com/catboost/catboost / UnusedConnKeepaliveTimeout

Method UnusedConnKeepaliveTimeout

library/cpp/neh/https.cpp:112–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 }
111
112 unsigned UnusedConnKeepaliveTimeout() const {
113 if (size_t e = ExceedSoftLimit()) {
114 size_t d = DeltaLimit();
115 size_t leftAvailableFd = NHttp::TFdLimits::ExceedLimit(d, e);
116 unsigned r = static_cast<unsigned>(MaxUnusedConnKeepaliveTimeout.load(std::memory_order_acquire) * leftAvailableFd / (d + 1));
117 return Max(r, (unsigned)MinUnusedConnKeepaliveTimeout.load(std::memory_order_acquire));
118 }
119 return MaxUnusedConnKeepaliveTimeout.load(std::memory_order_acquire);
120 }
121
122 void SetFdLimits(size_t soft, size_t hard) {
123 Limits.SetSoft(soft);

Callers 1

operator()Method · 0.80

Calls 2

MaxFunction · 0.50
loadMethod · 0.45

Tested by

no test coverage detected