MCPcopy Create free account
hub / github.com/apple/foundationdb / getEncryptDbgTraceKey

Function getEncryptDbgTraceKey

flow/EncryptUtils.cpp:38–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38std::string getEncryptDbgTraceKey(std::string_view prefix,
39 EncryptCipherDomainId domainId,
40 StringRef domainName,
41 Optional<EncryptCipherBaseKeyId> baseCipherId) {
42 // Construct the TraceEvent field key ensuring its uniqueness and compliance to TraceEvent field validator and log
43 // parsing tools
44 std::string dName = domainName.toString();
45 // Underscores are invalid in trace event detail name.
46 boost::replace_all(dName, "_", "-");
47 if (baseCipherId.present()) {
48 boost::format fmter("%s.%lld.%s.%llu");
49 return boost::str(boost::format(fmter % prefix % domainId % dName % baseCipherId.get()));
50 } else {
51 boost::format fmter("%s.%lld.%s");
52 return boost::str(boost::format(fmter % prefix % domainId % dName));
53 }
54}
55
56std::string getEncryptDbgTraceKeyWithTS(std::string_view prefix,
57 EncryptCipherDomainId domainId,

Calls 5

strFunction · 0.85
formatFunction · 0.70
getMethod · 0.65
toStringMethod · 0.45
presentMethod · 0.45

Tested by

no test coverage detected