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

Method GetPort

library/cpp/testing/common/network.cpp:185–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 }
184
185 NTesting::TPortHolder GetPort(ui16 port) const {
186 if (port && DisableRandomPorts_) {
187 auto ackport = TryAcquirePort(port);
188 if (ackport) {
189 return NTesting::TPortHolder{std::move(ackport)};
190 }
191 Y_ABORT("Cannot acquire port %hu!", port);
192 }
193 return GetFreePort();
194 }
195
196 private:
197 THolder<NTesting::IPort> TryAcquirePort(ui16 port) const {

Callers 1

GetPortFunction · 0.45

Calls 2

GetFreePortFunction · 0.85
moveFunction · 0.50

Tested by

no test coverage detected