const ( Profiling_Enable_FullMethodName = "/grpc.go.profiling.v1alpha.Profiling/Enable" Profiling_GetStreamStats_FullMethodName = "/grpc.go.profiling.v1alpha.Profiling/GetStreamStats" )
var File_profiling_proto_service_proto protoreflect.FileDescriptor
Profiling_ServiceDesc is the grpc.ServiceDesc for Profiling service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Profiling_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.go.profiling.v1alpha.Profiling", HandlerType: (*ProfilingServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Enable", Handler: _Profiling_Enable_Handler, }, { MethodName: "GetStreamStats", Handler: _Profiling_GetStreamStats_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "profiling/proto/service.proto", }
func RegisterProfilingServer(s grpc.ServiceRegistrar, srv ProfilingServer)
EnableRequest defines the fields in a /Profiling/Enable method request to toggle profiling on and off within a gRPC program.
type EnableRequest struct { // Setting this to true will enable profiling. Setting this to false will // disable profiling. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // contains filtered or unexported fields }
func (*EnableRequest) Descriptor() ([]byte, []int)
Deprecated: Use EnableRequest.ProtoReflect.Descriptor instead.
func (x *EnableRequest) GetEnabled() bool
func (*EnableRequest) ProtoMessage()
func (x *EnableRequest) ProtoReflect() protoreflect.Message
func (x *EnableRequest) Reset()
func (x *EnableRequest) String() string
EnableResponse defines the fields in a /Profiling/Enable method response.
type EnableResponse struct {
// contains filtered or unexported fields
}
func (*EnableResponse) Descriptor() ([]byte, []int)
Deprecated: Use EnableResponse.ProtoReflect.Descriptor instead.
func (*EnableResponse) ProtoMessage()
func (x *EnableResponse) ProtoReflect() protoreflect.Message
func (x *EnableResponse) Reset()
func (x *EnableResponse) String() string
GetStreamStatsRequest defines the fields in a /Profiling/GetStreamStats method request to retrieve stream-level stats in a gRPC client/server.
type GetStreamStatsRequest struct {
// contains filtered or unexported fields
}
func (*GetStreamStatsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStreamStatsRequest.ProtoReflect.Descriptor instead.
func (*GetStreamStatsRequest) ProtoMessage()
func (x *GetStreamStatsRequest) ProtoReflect() protoreflect.Message
func (x *GetStreamStatsRequest) Reset()
func (x *GetStreamStatsRequest) String() string
GetStreamStatsResponse defines the fields in a /Profiling/GetStreamStats method response.
type GetStreamStatsResponse struct { StreamStats []*Stat `protobuf:"bytes,1,rep,name=stream_stats,json=streamStats,proto3" json:"stream_stats,omitempty"` // contains filtered or unexported fields }
func (*GetStreamStatsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStreamStatsResponse.ProtoReflect.Descriptor instead.
func (x *GetStreamStatsResponse) GetStreamStats() []*Stat
func (*GetStreamStatsResponse) ProtoMessage()
func (x *GetStreamStatsResponse) ProtoReflect() protoreflect.Message
func (x *GetStreamStatsResponse) Reset()
func (x *GetStreamStatsResponse) String() string
ProfilingClient is the client API for Profiling service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ProfilingClient interface { // Enable allows users to toggle profiling on and off remotely. Enable(ctx context.Context, in *EnableRequest, opts ...grpc.CallOption) (*EnableResponse, error) // GetStreamStats is used to retrieve an array of stream-level stats from a // gRPC client/server. GetStreamStats(ctx context.Context, in *GetStreamStatsRequest, opts ...grpc.CallOption) (*GetStreamStatsResponse, error) }
func NewProfilingClient(cc grpc.ClientConnInterface) ProfilingClient
ProfilingServer is the server API for Profiling service. All implementations should embed UnimplementedProfilingServer for forward compatibility
type ProfilingServer interface { // Enable allows users to toggle profiling on and off remotely. Enable(context.Context, *EnableRequest) (*EnableResponse, error) // GetStreamStats is used to retrieve an array of stream-level stats from a // gRPC client/server. GetStreamStats(context.Context, *GetStreamStatsRequest) (*GetStreamStatsResponse, error) }
A Stat is a collection of Timers along with some additional metadata to tag and identify itself.
type Stat struct { // tags is a comma-separated list of strings used to categorize a stat. Tags string `protobuf:"bytes,1,opt,name=tags,proto3" json:"tags,omitempty"` // timers is an array of Timers, each representing a different // (but possibly overlapping) component within this stat. Timers []*Timer `protobuf:"bytes,2,rep,name=timers,proto3" json:"timers,omitempty"` // metadata is an array of bytes used to uniquely identify a stat with an // undefined encoding format. For example, the Stats returned by the // /Profiling/GetStreamStats service use the metadata field to encode the // connection ID and the stream ID of each query. Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
func (*Stat) Descriptor() ([]byte, []int)
Deprecated: Use Stat.ProtoReflect.Descriptor instead.
func (x *Stat) GetMetadata() []byte
func (x *Stat) GetTags() string
func (x *Stat) GetTimers() []*Timer
func (*Stat) ProtoMessage()
func (x *Stat) ProtoReflect() protoreflect.Message
func (x *Stat) Reset()
func (x *Stat) String() string
A Timer measures the start and end of execution of a component within gRPC that's being profiled. It includes a tag and some additional metadata to identify itself.
type Timer struct { // tags is a comma-separated list of strings used to tag a timer. Tags string `protobuf:"bytes,1,opt,name=tags,proto3" json:"tags,omitempty"` // begin_sec and begin_nsec are the start epoch second and nanosecond, // respectively, of the component profiled by this timer in UTC. begin_nsec // must be a non-negative integer. BeginSec int64 `protobuf:"varint,2,opt,name=begin_sec,json=beginSec,proto3" json:"begin_sec,omitempty"` BeginNsec int32 `protobuf:"varint,3,opt,name=begin_nsec,json=beginNsec,proto3" json:"begin_nsec,omitempty"` // end_sec and end_nsec are the end epoch second and nanosecond, // respectively, of the component profiled by this timer in UTC. end_nsec // must be a non-negative integer. EndSec int64 `protobuf:"varint,4,opt,name=end_sec,json=endSec,proto3" json:"end_sec,omitempty"` EndNsec int32 `protobuf:"varint,5,opt,name=end_nsec,json=endNsec,proto3" json:"end_nsec,omitempty"` // go_id is the goroutine ID of the component being profiled. GoId int64 `protobuf:"varint,6,opt,name=go_id,json=goId,proto3" json:"go_id,omitempty"` // contains filtered or unexported fields }
func (*Timer) Descriptor() ([]byte, []int)
Deprecated: Use Timer.ProtoReflect.Descriptor instead.
func (x *Timer) GetBeginNsec() int32
func (x *Timer) GetBeginSec() int64
func (x *Timer) GetEndNsec() int32
func (x *Timer) GetEndSec() int64
func (x *Timer) GetGoId() int64
func (x *Timer) GetTags() string
func (*Timer) ProtoMessage()
func (x *Timer) ProtoReflect() protoreflect.Message
func (x *Timer) Reset()
func (x *Timer) String() string
UnimplementedProfilingServer should be embedded to have forward compatible implementations.
type UnimplementedProfilingServer struct { }
func (UnimplementedProfilingServer) Enable(context.Context, *EnableRequest) (*EnableResponse, error)
func (UnimplementedProfilingServer) GetStreamStats(context.Context, *GetStreamStatsRequest) (*GetStreamStatsResponse, error)
UnsafeProfilingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProfilingServer will result in compilation errors.
type UnsafeProfilingServer interface {
// contains filtered or unexported methods
}