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

Method AddEvent

library/cpp/chromium_trace/yson.cpp:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void TYsonTraceConsumer::AddEvent(const TDurationCompleteEvent& event, const TEventArgs* args) {
44 BeginEvent('X', event.Origin);
45 Yson.OnKeyedItem(TStringBuf("ts"));
46 Yson.OnUint64Scalar(event.BeginTime.WallTime.MicroSeconds());
47 Yson.OnKeyedItem(TStringBuf("tts"));
48 Yson.OnUint64Scalar(event.BeginTime.ThreadCPUTime.MicroSeconds());
49 Yson.OnKeyedItem(TStringBuf("dur"));
50 Yson.OnUint64Scalar((event.EndTime.WallTime - event.BeginTime.WallTime).MicroSeconds());
51 Yson.OnKeyedItem(TStringBuf("tdur"));
52 Yson.OnUint64Scalar((event.EndTime.ThreadCPUTime - event.BeginTime.ThreadCPUTime).MicroSeconds());
53 Yson.OnKeyedItem(TStringBuf("name"));
54 Yson.OnStringScalar(event.Name);
55 Yson.OnKeyedItem(TStringBuf("cat"));
56 Yson.OnStringScalar(event.Categories);
57 WriteFlow(event.Flow);
58 EndEvent(args);
59}
60
61void TYsonTraceConsumer::AddEvent(const TDurationBeginEvent& event, const TEventArgs* args) {
62 BeginEvent('B', event.Origin);

Callers 6

AddDurationBeginNowMethod · 0.45
AddDurationEndNowMethod · 0.45
AddCounterNowMethod · 0.45
AddCurrentProcessNameMethod · 0.45
AddCurrentThreadNameMethod · 0.45
AddCurrentThreadIndexMethod · 0.45

Calls 4

OnKeyedItemMethod · 0.45
OnUint64ScalarMethod · 0.45
MicroSecondsMethod · 0.45
OnStringScalarMethod · 0.45

Tested by

no test coverage detected