MCPcopy Create free account
hub / github.com/bytedance/bolt / getConfig

Function getConfig

bolt/common/memory/SharedArbitrator.cpp:94–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92
93template <typename T>
94T getConfig(
95 const std::unordered_map<std::string, std::string>& configs,
96 const std::string_view& key,
97 const T& defaultValue) {
98 if (configs.count(std::string(key)) > 0) {
99 try {
100 return folly::to<T>(configs.at(std::string(key)));
101 } catch (const std::exception& e) {
102 BOLT_USER_FAIL(
103 "Failed while parsing SharedArbitrator configs: {}", e.what());
104 }
105 }
106 return defaultValue;
107}
108} // namespace
109
110int64_t SharedArbitrator::ExtraConfig::reservedCapacity(

Callers 15

ContextMethod · 0.85
getConfigInternalMethod · 0.85
getConfigInternalMethod · 0.85
IntegerColumnWriterMethod · 0.85
initStreamWritersMethod · 0.85
DecimalColumnWriterMethod · 0.85
StringColumnWriterMethod · 0.85
initStreamWritersMethod · 0.85
WriterContextMethod · 0.85
validateConfigsMethod · 0.85
newStreamMethod · 0.85
newDataBufferHolderMethod · 0.85

Calls 3

countMethod · 0.45
atMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected