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

Method WriteArgs

library/cpp/chromium_trace/json.cpp:95–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void TJsonTraceConsumer::WriteArgs(const TEventArgs& args) {
96 struct TWriteArg {
97 NJsonWriter::TBuf* Output;
98
99 void operator()(TStringBuf value) {
100 Output->WriteString(value);
101 }
102
103 void operator()(i64 value) {
104 Output->WriteLongLong(value);
105 }
106
107 void operator()(double value) {
108 Output->WriteDouble(value);
109 }
110 };
111
112 Json.WriteKey(TStringBuf("args")).BeginObject();
113 for (const auto& item : args.Items) {
114 Json.WriteKey(item.Name);
115 std::visit(TWriteArg{&Json}, item.Value);
116 }
117 Json.EndObject();
118}
119
120void TJsonTraceConsumer::WriteFlow(const TEventFlow& flow) {
121 if (flow.Type == EFlowType::None) {

Callers

nothing calls this directly

Calls 4

visitFunction · 0.50
BeginObjectMethod · 0.45
WriteKeyMethod · 0.45
EndObjectMethod · 0.45

Tested by

no test coverage detected