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

Method GetStatus

library/cpp/neh/stat.cpp:13–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11volatile TAtomic NNeh::TServiceStat::ReSendValidatorPeriod_ = 100;
12
13NNeh::TServiceStat::EStatus NNeh::TServiceStat::GetStatus() {
14 if (!AtomicGet(MaxContinuousErrors_) || AtomicGet(LastContinuousErrors_) < AtomicGet(MaxContinuousErrors_)) {
15 return Ok;
16 }
17
18 if (RequestsInProcess_.Val() != 0)
19 return Fail;
20
21 if (AtomicIncrement(SendValidatorCounter_) != AtomicGet(ReSendValidatorPeriod_)) {
22 return Fail;
23 }
24
25 //time for refresh service status (send validation request)
26 AtomicSet(SendValidatorCounter_, 0);
27
28 return ReTry;
29}
30
31void NNeh::TServiceStat::DbgOut(IOutputStream& out) const {
32 out << "----------------------------------------------------" << '\n';;

Callers 2

RequestMethod · 0.45
RunMethod · 0.45

Calls 4

AtomicGetFunction · 0.50
AtomicIncrementFunction · 0.50
AtomicSetFunction · 0.50
ValMethod · 0.45

Tested by

no test coverage detected