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

Method FindMatch

library/cpp/resource/registry.cpp:97–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 }
96
97 void FindMatch(const TStringBuf subkey, IMatch& cb) const override {
98 for (const auto& it : D_) {
99 if (it.first.StartsWith(subkey)) {
100 // temporary
101 // https://st.yandex-team.ru/DEVTOOLS-3985
102 try {
103 const TResource res = {
104 it.first, Decompress(it.second)};
105 cb.OnMatch(res);
106 } catch (const yexception& e) {
107 if (GetEnv("RESOURCE_DECOMPRESS_DIAG")) {
108 Cerr << "Can't decompress resource " << it.first << Endl << e.what() << Endl;
109 }
110 throw e;
111 }
112 }
113 }
114 }
115
116 size_t Count() const noexcept override {
117 return D_.size();

Callers

nothing calls this directly

Calls 5

DecompressFunction · 0.85
GetEnvFunction · 0.50
StartsWithMethod · 0.45
OnMatchMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected