diff options
Diffstat (limited to 'library/cpp/lwtrace/protos/lwtrace.proto')
-rw-r--r-- | library/cpp/lwtrace/protos/lwtrace.proto | 246 |
1 files changed, 123 insertions, 123 deletions
diff --git a/library/cpp/lwtrace/protos/lwtrace.proto b/library/cpp/lwtrace/protos/lwtrace.proto index 4c07b54625..0051095719 100644 --- a/library/cpp/lwtrace/protos/lwtrace.proto +++ b/library/cpp/lwtrace/protos/lwtrace.proto @@ -1,64 +1,64 @@ -/* - * This file defines language for trace queries and serialization format for trace logs - */ +/* + * This file defines language for trace queries and serialization format for trace logs + */ syntax = "proto3"; -package NLWTrace; - +package NLWTrace; + option go_package = "a.yandex-team.ru/library/cpp/lwtrace/protos"; -message TProbeDesc { +message TProbeDesc { string Name = 1; // Use either name+provider string Provider = 3; string Group = 2; // or group -} - -enum EOperatorType { +} + +enum EOperatorType { OT_EQ = 0; OT_NE = 1; OT_LT = 2; OT_LE = 3; OT_GT = 4; OT_GE = 5; -} - +} + message TArgument { string Param = 1; - bytes Value = 2; + bytes Value = 2; string Variable = 3; } -message TOperator { +message TOperator { EOperatorType Type = 1; repeated TArgument Argument = 8; -} - -message TPredicate { - repeated TOperator Operators = 1; // All operators are combined using logical AND - double SampleRate = 2; // value 1.0 means trigger actions on 100% events (do not sample if value is not set) -} - -message TLogAction { +} + +message TPredicate { + repeated TOperator Operators = 1; // All operators are combined using logical AND + double SampleRate = 2; // value 1.0 means trigger actions on 100% events (do not sample if value is not set) +} + +message TLogAction { bool DoNotLogParams = 2; bool LogTimestamp = 3; uint32 MaxRecords = 4; // Do not write more than MaxRecords records to the log (count from the trace beginning, not start) -} - +} + message TPrintToStderrAction { } message TKillAction { -} - +} + message TSleepAction { uint64 NanoSeconds = 1; -} - -message TCustomAction { +} + +message TCustomAction { string Name = 1; - repeated string Opts = 2; -} - + repeated string Opts = 2; +} + enum EStatementType { ST_MOV = 0; ST_ADD = 1; @@ -77,133 +77,133 @@ message TStatementAction { repeated TArgument Argument = 2; } -message TRunLogShuttleAction { +message TRunLogShuttleAction { bool Ignore = 1; uint64 ShuttlesCount = 2; uint64 MaxTrackLength = 3; -} - -message TEditLogShuttleAction { +} + +message TEditLogShuttleAction { bool Ignore = 1; -} - -message TDropLogShuttleAction { -} - -message TAction { +} + +message TDropLogShuttleAction { +} + +message TAction { TLogAction LogAction = 2; TPrintToStderrAction PrintToStderrAction = 3; TCustomAction CustomAction = 4; TKillAction KillAction = 6; TSleepAction SleepAction = 7; TStatementAction StatementAction = 8; - + TRunLogShuttleAction RunLogShuttleAction = 100; TEditLogShuttleAction EditLogShuttleAction = 101; TDropLogShuttleAction DropLogShuttleAction = 102; -} - -message TBlock { +} + +message TBlock { TProbeDesc ProbeDesc = 1; TPredicate Predicate = 2; repeated TAction Action = 3; -} - -message TQuery { - // Number of events to hold for every thread in cyclic buffer - // (Won't be used if LogDurationUs is set to non-zero value) +} + +message TQuery { + // Number of events to hold for every thread in cyclic buffer + // (Won't be used if LogDurationUs is set to non-zero value) uint32 PerThreadLogSize = 1; - - // Hold events for last Duration microseconds - // (If zero, than per-thread cyclic buffer will be used to store events) + + // Hold events for last Duration microseconds + // (If zero, than per-thread cyclic buffer will be used to store events) uint64 LogDurationUs = 2; - - repeated TBlock Blocks = 3; -} - -message TDashboard { - message TCell { - optional string Url = 1; - optional string Title = 2; - optional string Text = 3; - optional uint32 RowSpan = 4; - optional uint32 ColSpan = 5; - } - - message TRow { - repeated TCell Cells = 1; - } - - optional string Name = 1; - optional string Description = 2; - repeated TRow Rows = 3; -} - -////////////////////////////////////////////////////////////////////////////////////////////// -// Serialization format for trace logs // -////////////////////////////////////////////////////////////////////////////////////////////// -enum EParamTypePb { - PT_UNKNOWN = 0; - PT_I64 = 1; - PT_Ui64 = 2; - PT_Double = 3; - PT_Str = 4; - PT_Symbol = 5; - PT_Check = 6; -} - -message TEventPb { + + repeated TBlock Blocks = 3; +} + +message TDashboard { + message TCell { + optional string Url = 1; + optional string Title = 2; + optional string Text = 3; + optional uint32 RowSpan = 4; + optional uint32 ColSpan = 5; + } + + message TRow { + repeated TCell Cells = 1; + } + + optional string Name = 1; + optional string Description = 2; + repeated TRow Rows = 3; +} + +////////////////////////////////////////////////////////////////////////////////////////////// +// Serialization format for trace logs // +////////////////////////////////////////////////////////////////////////////////////////////// +enum EParamTypePb { + PT_UNKNOWN = 0; + PT_I64 = 1; + PT_Ui64 = 2; + PT_Double = 3; + PT_Str = 4; + PT_Symbol = 5; + PT_Check = 6; +} + +message TEventPb { string Name = 1; - repeated string Groups = 2; // First group is provider - repeated EParamTypePb ParamTypes = 3; - repeated string ParamNames = 4; -} - -message TLogItemPb { + repeated string Groups = 2; // First group is provider + repeated EParamTypePb ParamTypes = 3; + repeated string ParamNames = 4; +} + +message TLogItemPb { uint64 Thread = 1; string Name = 2; string Provider = 3; - repeated bytes Params = 4; + repeated bytes Params = 4; uint64 Timestamp = 5; // microseconds since epoch uint64 TimestampCycles = 6; // cycles since machine boot -} - -message TThreadLogPb { +} + +message TThreadLogPb { uint64 ThreadId = 1; - repeated TLogItemPb LogItems = 2; -} - -message TLogPb { - // Trace info + repeated TLogItemPb LogItems = 2; +} + +message TLogPb { + // Trace info string Name = 1; string Description = 2; uint64 EventsCount = 3; uint64 CrtTime = 4; // Log creation time (seconds since epoch) - - // Traced host info + + // Traced host info string Hostname = 101; - - // Traced process info + + // Traced process info string ProcessName = 201; - bytes CommandLine = 202; + bytes CommandLine = 202; uint64 ProcessStartTime = 203; uint64 Pid = 204; string VersionInfo = 205; // Svn info - - // Trace query and results + + // Trace query and results TQuery Query = 301; - repeated TEventPb Events = 302; - repeated TThreadLogPb ThreadLogs = 303; -} - -message TShuttlePb { - repeated TLogPb Parts = 1; + repeated TEventPb Events = 302; + repeated TThreadLogPb ThreadLogs = 303; +} + +message TShuttlePb { + repeated TLogPb Parts = 1; TQuery Query = 2; -} - -message TOrbitPb { - repeated TShuttlePb Shuttles = 1; -} +} + +message TOrbitPb { + repeated TShuttlePb Shuttles = 1; +} //////////////////////////////////////////////////////////////////////////////// // Trace parameter. @@ -216,7 +216,7 @@ message TTraceParam int64 IntValue = 2; uint64 UintValue = 3; double DoubleValue = 4; - bytes StrValue = 5; + bytes StrValue = 5; } } |