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

Method dump_exposed

src/bvar/mvariable.cpp:243–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243size_t MVariableBase::dump_exposed(Dumper* dumper, const DumpOptions* options) {
244 if (NULL == dumper) {
245 LOG(ERROR) << "Parameter[dumper] is NULL";
246 return -1;
247 }
248 DumpOptions opt;
249 if (options) {
250 opt = *options;
251 }
252 std::vector<std::string> mvars;
253 list_exposed(&mvars);
254 size_t n = 0;
255 for (auto& mvar : mvars) {
256 MVarMapWithLock& m = get_mvar_map();
257 BAIDU_SCOPED_LOCK(m.mutex);
258 MVarEntry* entry = m.seek(mvar);
259 if (entry) {
260 n += entry->var->dump(dumper, &opt);
261 }
262 if (n > static_cast<size_t>(FLAGS_bvar_max_dump_multi_dimension_metric_number)) {
263 LOG(WARNING) << "truncated because of exceed max dump multi dimension label number["
264 << FLAGS_bvar_max_dump_multi_dimension_metric_number << "]";
265 break;
266 }
267 }
268 return n;
269}
270
271} // namespace bvar

Callers

nothing calls this directly

Calls 2

seekMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected