google.golang.org/grpc@v1.74.2/profiling/proto/service.pb.go (about)

     1  // Copyright 2019 gRPC authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by protoc-gen-go. DO NOT EDIT.
    16  // versions:
    17  // 	protoc-gen-go v1.36.6
    18  // 	protoc        v5.27.1
    19  // source: profiling/proto/service.proto
    20  
    21  package proto
    22  
    23  import (
    24  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    25  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    26  	reflect "reflect"
    27  	sync "sync"
    28  	unsafe "unsafe"
    29  )
    30  
    31  const (
    32  	// Verify that this generated code is sufficiently up-to-date.
    33  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    34  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    35  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    36  )
    37  
    38  // EnableRequest defines the fields in a /Profiling/Enable method request to
    39  // toggle profiling on and off within a gRPC program.
    40  type EnableRequest struct {
    41  	state protoimpl.MessageState `protogen:"open.v1"`
    42  	// Setting this to true will enable profiling. Setting this to false will
    43  	// disable profiling.
    44  	Enabled       bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
    45  	unknownFields protoimpl.UnknownFields
    46  	sizeCache     protoimpl.SizeCache
    47  }
    48  
    49  func (x *EnableRequest) Reset() {
    50  	*x = EnableRequest{}
    51  	mi := &file_profiling_proto_service_proto_msgTypes[0]
    52  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    53  	ms.StoreMessageInfo(mi)
    54  }
    55  
    56  func (x *EnableRequest) String() string {
    57  	return protoimpl.X.MessageStringOf(x)
    58  }
    59  
    60  func (*EnableRequest) ProtoMessage() {}
    61  
    62  func (x *EnableRequest) ProtoReflect() protoreflect.Message {
    63  	mi := &file_profiling_proto_service_proto_msgTypes[0]
    64  	if x != nil {
    65  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    66  		if ms.LoadMessageInfo() == nil {
    67  			ms.StoreMessageInfo(mi)
    68  		}
    69  		return ms
    70  	}
    71  	return mi.MessageOf(x)
    72  }
    73  
    74  // Deprecated: Use EnableRequest.ProtoReflect.Descriptor instead.
    75  func (*EnableRequest) Descriptor() ([]byte, []int) {
    76  	return file_profiling_proto_service_proto_rawDescGZIP(), []int{0}
    77  }
    78  
    79  func (x *EnableRequest) GetEnabled() bool {
    80  	if x != nil {
    81  		return x.Enabled
    82  	}
    83  	return false
    84  }
    85  
    86  // EnableResponse defines the fields in a /Profiling/Enable method response.
    87  type EnableResponse struct {
    88  	state         protoimpl.MessageState `protogen:"open.v1"`
    89  	unknownFields protoimpl.UnknownFields
    90  	sizeCache     protoimpl.SizeCache
    91  }
    92  
    93  func (x *EnableResponse) Reset() {
    94  	*x = EnableResponse{}
    95  	mi := &file_profiling_proto_service_proto_msgTypes[1]
    96  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    97  	ms.StoreMessageInfo(mi)
    98  }
    99  
   100  func (x *EnableResponse) String() string {
   101  	return protoimpl.X.MessageStringOf(x)
   102  }
   103  
   104  func (*EnableResponse) ProtoMessage() {}
   105  
   106  func (x *EnableResponse) ProtoReflect() protoreflect.Message {
   107  	mi := &file_profiling_proto_service_proto_msgTypes[1]
   108  	if x != nil {
   109  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   110  		if ms.LoadMessageInfo() == nil {
   111  			ms.StoreMessageInfo(mi)
   112  		}
   113  		return ms
   114  	}
   115  	return mi.MessageOf(x)
   116  }
   117  
   118  // Deprecated: Use EnableResponse.ProtoReflect.Descriptor instead.
   119  func (*EnableResponse) Descriptor() ([]byte, []int) {
   120  	return file_profiling_proto_service_proto_rawDescGZIP(), []int{1}
   121  }
   122  
   123  // GetStreamStatsRequest defines the fields in a /Profiling/GetStreamStats
   124  // method request to retrieve stream-level stats in a gRPC client/server.
   125  type GetStreamStatsRequest struct {
   126  	state         protoimpl.MessageState `protogen:"open.v1"`
   127  	unknownFields protoimpl.UnknownFields
   128  	sizeCache     protoimpl.SizeCache
   129  }
   130  
   131  func (x *GetStreamStatsRequest) Reset() {
   132  	*x = GetStreamStatsRequest{}
   133  	mi := &file_profiling_proto_service_proto_msgTypes[2]
   134  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   135  	ms.StoreMessageInfo(mi)
   136  }
   137  
   138  func (x *GetStreamStatsRequest) String() string {
   139  	return protoimpl.X.MessageStringOf(x)
   140  }
   141  
   142  func (*GetStreamStatsRequest) ProtoMessage() {}
   143  
   144  func (x *GetStreamStatsRequest) ProtoReflect() protoreflect.Message {
   145  	mi := &file_profiling_proto_service_proto_msgTypes[2]
   146  	if x != nil {
   147  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   148  		if ms.LoadMessageInfo() == nil {
   149  			ms.StoreMessageInfo(mi)
   150  		}
   151  		return ms
   152  	}
   153  	return mi.MessageOf(x)
   154  }
   155  
   156  // Deprecated: Use GetStreamStatsRequest.ProtoReflect.Descriptor instead.
   157  func (*GetStreamStatsRequest) Descriptor() ([]byte, []int) {
   158  	return file_profiling_proto_service_proto_rawDescGZIP(), []int{2}
   159  }
   160  
   161  // GetStreamStatsResponse defines the fields in a /Profiling/GetStreamStats
   162  // method response.
   163  type GetStreamStatsResponse struct {
   164  	state         protoimpl.MessageState `protogen:"open.v1"`
   165  	StreamStats   []*Stat                `protobuf:"bytes,1,rep,name=stream_stats,json=streamStats,proto3" json:"stream_stats,omitempty"`
   166  	unknownFields protoimpl.UnknownFields
   167  	sizeCache     protoimpl.SizeCache
   168  }
   169  
   170  func (x *GetStreamStatsResponse) Reset() {
   171  	*x = GetStreamStatsResponse{}
   172  	mi := &file_profiling_proto_service_proto_msgTypes[3]
   173  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   174  	ms.StoreMessageInfo(mi)
   175  }
   176  
   177  func (x *GetStreamStatsResponse) String() string {
   178  	return protoimpl.X.MessageStringOf(x)
   179  }
   180  
   181  func (*GetStreamStatsResponse) ProtoMessage() {}
   182  
   183  func (x *GetStreamStatsResponse) ProtoReflect() protoreflect.Message {
   184  	mi := &file_profiling_proto_service_proto_msgTypes[3]
   185  	if x != nil {
   186  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   187  		if ms.LoadMessageInfo() == nil {
   188  			ms.StoreMessageInfo(mi)
   189  		}
   190  		return ms
   191  	}
   192  	return mi.MessageOf(x)
   193  }
   194  
   195  // Deprecated: Use GetStreamStatsResponse.ProtoReflect.Descriptor instead.
   196  func (*GetStreamStatsResponse) Descriptor() ([]byte, []int) {
   197  	return file_profiling_proto_service_proto_rawDescGZIP(), []int{3}
   198  }
   199  
   200  func (x *GetStreamStatsResponse) GetStreamStats() []*Stat {
   201  	if x != nil {
   202  		return x.StreamStats
   203  	}
   204  	return nil
   205  }
   206  
   207  // A Timer measures the start and end of execution of a component within
   208  // gRPC that's being profiled. It includes a tag and some additional metadata
   209  // to identify itself.
   210  type Timer struct {
   211  	state protoimpl.MessageState `protogen:"open.v1"`
   212  	// tags is a comma-separated list of strings used to tag a timer.
   213  	Tags string `protobuf:"bytes,1,opt,name=tags,proto3" json:"tags,omitempty"`
   214  	// begin_sec and begin_nsec are the start epoch second and nanosecond,
   215  	// respectively, of the component profiled by this timer in UTC. begin_nsec
   216  	// must be a non-negative integer.
   217  	BeginSec  int64 `protobuf:"varint,2,opt,name=begin_sec,json=beginSec,proto3" json:"begin_sec,omitempty"`
   218  	BeginNsec int32 `protobuf:"varint,3,opt,name=begin_nsec,json=beginNsec,proto3" json:"begin_nsec,omitempty"`
   219  	// end_sec and end_nsec are the end epoch second and nanosecond,
   220  	// respectively, of the component profiled by this timer in UTC. end_nsec
   221  	// must be a non-negative integer.
   222  	EndSec  int64 `protobuf:"varint,4,opt,name=end_sec,json=endSec,proto3" json:"end_sec,omitempty"`
   223  	EndNsec int32 `protobuf:"varint,5,opt,name=end_nsec,json=endNsec,proto3" json:"end_nsec,omitempty"`
   224  	// go_id is the goroutine ID of the component being profiled.
   225  	GoId          int64 `protobuf:"varint,6,opt,name=go_id,json=goId,proto3" json:"go_id,omitempty"`
   226  	unknownFields protoimpl.UnknownFields
   227  	sizeCache     protoimpl.SizeCache
   228  }
   229  
   230  func (x *Timer) Reset() {
   231  	*x = Timer{}
   232  	mi := &file_profiling_proto_service_proto_msgTypes[4]
   233  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   234  	ms.StoreMessageInfo(mi)
   235  }
   236  
   237  func (x *Timer) String() string {
   238  	return protoimpl.X.MessageStringOf(x)
   239  }
   240  
   241  func (*Timer) ProtoMessage() {}
   242  
   243  func (x *Timer) ProtoReflect() protoreflect.Message {
   244  	mi := &file_profiling_proto_service_proto_msgTypes[4]
   245  	if x != nil {
   246  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   247  		if ms.LoadMessageInfo() == nil {
   248  			ms.StoreMessageInfo(mi)
   249  		}
   250  		return ms
   251  	}
   252  	return mi.MessageOf(x)
   253  }
   254  
   255  // Deprecated: Use Timer.ProtoReflect.Descriptor instead.
   256  func (*Timer) Descriptor() ([]byte, []int) {
   257  	return file_profiling_proto_service_proto_rawDescGZIP(), []int{4}
   258  }
   259  
   260  func (x *Timer) GetTags() string {
   261  	if x != nil {
   262  		return x.Tags
   263  	}
   264  	return ""
   265  }
   266  
   267  func (x *Timer) GetBeginSec() int64 {
   268  	if x != nil {
   269  		return x.BeginSec
   270  	}
   271  	return 0
   272  }
   273  
   274  func (x *Timer) GetBeginNsec() int32 {
   275  	if x != nil {
   276  		return x.BeginNsec
   277  	}
   278  	return 0
   279  }
   280  
   281  func (x *Timer) GetEndSec() int64 {
   282  	if x != nil {
   283  		return x.EndSec
   284  	}
   285  	return 0
   286  }
   287  
   288  func (x *Timer) GetEndNsec() int32 {
   289  	if x != nil {
   290  		return x.EndNsec
   291  	}
   292  	return 0
   293  }
   294  
   295  func (x *Timer) GetGoId() int64 {
   296  	if x != nil {
   297  		return x.GoId
   298  	}
   299  	return 0
   300  }
   301  
   302  // A Stat is a collection of Timers along with some additional
   303  // metadata to tag and identify itself.
   304  type Stat struct {
   305  	state protoimpl.MessageState `protogen:"open.v1"`
   306  	// tags is a comma-separated list of strings used to categorize a stat.
   307  	Tags string `protobuf:"bytes,1,opt,name=tags,proto3" json:"tags,omitempty"`
   308  	// timers is an array of Timers, each representing a different
   309  	// (but possibly overlapping) component within this stat.
   310  	Timers []*Timer `protobuf:"bytes,2,rep,name=timers,proto3" json:"timers,omitempty"`
   311  	// metadata is an array of bytes used to uniquely identify a stat with an
   312  	// undefined encoding format. For example, the Stats returned by the
   313  	// /Profiling/GetStreamStats service use the metadata field to encode the
   314  	// connection ID and the stream ID of each query.
   315  	Metadata      []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
   316  	unknownFields protoimpl.UnknownFields
   317  	sizeCache     protoimpl.SizeCache
   318  }
   319  
   320  func (x *Stat) Reset() {
   321  	*x = Stat{}
   322  	mi := &file_profiling_proto_service_proto_msgTypes[5]
   323  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   324  	ms.StoreMessageInfo(mi)
   325  }
   326  
   327  func (x *Stat) String() string {
   328  	return protoimpl.X.MessageStringOf(x)
   329  }
   330  
   331  func (*Stat) ProtoMessage() {}
   332  
   333  func (x *Stat) ProtoReflect() protoreflect.Message {
   334  	mi := &file_profiling_proto_service_proto_msgTypes[5]
   335  	if x != nil {
   336  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   337  		if ms.LoadMessageInfo() == nil {
   338  			ms.StoreMessageInfo(mi)
   339  		}
   340  		return ms
   341  	}
   342  	return mi.MessageOf(x)
   343  }
   344  
   345  // Deprecated: Use Stat.ProtoReflect.Descriptor instead.
   346  func (*Stat) Descriptor() ([]byte, []int) {
   347  	return file_profiling_proto_service_proto_rawDescGZIP(), []int{5}
   348  }
   349  
   350  func (x *Stat) GetTags() string {
   351  	if x != nil {
   352  		return x.Tags
   353  	}
   354  	return ""
   355  }
   356  
   357  func (x *Stat) GetTimers() []*Timer {
   358  	if x != nil {
   359  		return x.Timers
   360  	}
   361  	return nil
   362  }
   363  
   364  func (x *Stat) GetMetadata() []byte {
   365  	if x != nil {
   366  		return x.Metadata
   367  	}
   368  	return nil
   369  }
   370  
   371  var File_profiling_proto_service_proto protoreflect.FileDescriptor
   372  
   373  const file_profiling_proto_service_proto_rawDesc = "" +
   374  	"\n" +
   375  	"\x1dprofiling/proto/service.proto\x12\x19grpc.go.profiling.v1alpha\")\n" +
   376  	"\rEnableRequest\x12\x18\n" +
   377  	"\aenabled\x18\x01 \x01(\bR\aenabled\"\x10\n" +
   378  	"\x0eEnableResponse\"\x17\n" +
   379  	"\x15GetStreamStatsRequest\"\\\n" +
   380  	"\x16GetStreamStatsResponse\x12B\n" +
   381  	"\fstream_stats\x18\x01 \x03(\v2\x1f.grpc.go.profiling.v1alpha.StatR\vstreamStats\"\xa0\x01\n" +
   382  	"\x05Timer\x12\x12\n" +
   383  	"\x04tags\x18\x01 \x01(\tR\x04tags\x12\x1b\n" +
   384  	"\tbegin_sec\x18\x02 \x01(\x03R\bbeginSec\x12\x1d\n" +
   385  	"\n" +
   386  	"begin_nsec\x18\x03 \x01(\x05R\tbeginNsec\x12\x17\n" +
   387  	"\aend_sec\x18\x04 \x01(\x03R\x06endSec\x12\x19\n" +
   388  	"\bend_nsec\x18\x05 \x01(\x05R\aendNsec\x12\x13\n" +
   389  	"\x05go_id\x18\x06 \x01(\x03R\x04goId\"p\n" +
   390  	"\x04Stat\x12\x12\n" +
   391  	"\x04tags\x18\x01 \x01(\tR\x04tags\x128\n" +
   392  	"\x06timers\x18\x02 \x03(\v2 .grpc.go.profiling.v1alpha.TimerR\x06timers\x12\x1a\n" +
   393  	"\bmetadata\x18\x03 \x01(\fR\bmetadata2\xe1\x01\n" +
   394  	"\tProfiling\x12]\n" +
   395  	"\x06Enable\x12(.grpc.go.profiling.v1alpha.EnableRequest\x1a).grpc.go.profiling.v1alpha.EnableResponse\x12u\n" +
   396  	"\x0eGetStreamStats\x120.grpc.go.profiling.v1alpha.GetStreamStatsRequest\x1a1.grpc.go.profiling.v1alpha.GetStreamStatsResponseB(Z&google.golang.org/grpc/profiling/protob\x06proto3"
   397  
   398  var (
   399  	file_profiling_proto_service_proto_rawDescOnce sync.Once
   400  	file_profiling_proto_service_proto_rawDescData []byte
   401  )
   402  
   403  func file_profiling_proto_service_proto_rawDescGZIP() []byte {
   404  	file_profiling_proto_service_proto_rawDescOnce.Do(func() {
   405  		file_profiling_proto_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_profiling_proto_service_proto_rawDesc), len(file_profiling_proto_service_proto_rawDesc)))
   406  	})
   407  	return file_profiling_proto_service_proto_rawDescData
   408  }
   409  
   410  var file_profiling_proto_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
   411  var file_profiling_proto_service_proto_goTypes = []any{
   412  	(*EnableRequest)(nil),          // 0: grpc.go.profiling.v1alpha.EnableRequest
   413  	(*EnableResponse)(nil),         // 1: grpc.go.profiling.v1alpha.EnableResponse
   414  	(*GetStreamStatsRequest)(nil),  // 2: grpc.go.profiling.v1alpha.GetStreamStatsRequest
   415  	(*GetStreamStatsResponse)(nil), // 3: grpc.go.profiling.v1alpha.GetStreamStatsResponse
   416  	(*Timer)(nil),                  // 4: grpc.go.profiling.v1alpha.Timer
   417  	(*Stat)(nil),                   // 5: grpc.go.profiling.v1alpha.Stat
   418  }
   419  var file_profiling_proto_service_proto_depIdxs = []int32{
   420  	5, // 0: grpc.go.profiling.v1alpha.GetStreamStatsResponse.stream_stats:type_name -> grpc.go.profiling.v1alpha.Stat
   421  	4, // 1: grpc.go.profiling.v1alpha.Stat.timers:type_name -> grpc.go.profiling.v1alpha.Timer
   422  	0, // 2: grpc.go.profiling.v1alpha.Profiling.Enable:input_type -> grpc.go.profiling.v1alpha.EnableRequest
   423  	2, // 3: grpc.go.profiling.v1alpha.Profiling.GetStreamStats:input_type -> grpc.go.profiling.v1alpha.GetStreamStatsRequest
   424  	1, // 4: grpc.go.profiling.v1alpha.Profiling.Enable:output_type -> grpc.go.profiling.v1alpha.EnableResponse
   425  	3, // 5: grpc.go.profiling.v1alpha.Profiling.GetStreamStats:output_type -> grpc.go.profiling.v1alpha.GetStreamStatsResponse
   426  	4, // [4:6] is the sub-list for method output_type
   427  	2, // [2:4] is the sub-list for method input_type
   428  	2, // [2:2] is the sub-list for extension type_name
   429  	2, // [2:2] is the sub-list for extension extendee
   430  	0, // [0:2] is the sub-list for field type_name
   431  }
   432  
   433  func init() { file_profiling_proto_service_proto_init() }
   434  func file_profiling_proto_service_proto_init() {
   435  	if File_profiling_proto_service_proto != nil {
   436  		return
   437  	}
   438  	type x struct{}
   439  	out := protoimpl.TypeBuilder{
   440  		File: protoimpl.DescBuilder{
   441  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   442  			RawDescriptor: unsafe.Slice(unsafe.StringData(file_profiling_proto_service_proto_rawDesc), len(file_profiling_proto_service_proto_rawDesc)),
   443  			NumEnums:      0,
   444  			NumMessages:   6,
   445  			NumExtensions: 0,
   446  			NumServices:   1,
   447  		},
   448  		GoTypes:           file_profiling_proto_service_proto_goTypes,
   449  		DependencyIndexes: file_profiling_proto_service_proto_depIdxs,
   450  		MessageInfos:      file_profiling_proto_service_proto_msgTypes,
   451  	}.Build()
   452  	File_profiling_proto_service_proto = out.File
   453  	file_profiling_proto_service_proto_goTypes = nil
   454  	file_profiling_proto_service_proto_depIdxs = nil
   455  }