Documentation ¶
Index ¶
- func RegisterProfilingServer(s *grpc.Server, srv ProfilingServer)
- type EnableRequest
- func (*EnableRequest) Descriptor() ([]byte, []int)
- func (m *EnableRequest) GetEnabled() bool
- func (*EnableRequest) ProtoMessage()
- func (m *EnableRequest) Reset()
- func (m *EnableRequest) String() string
- func (m *EnableRequest) XXX_DiscardUnknown()
- func (m *EnableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EnableRequest) XXX_Merge(src proto.Message)
- func (m *EnableRequest) XXX_Size() int
- func (m *EnableRequest) XXX_Unmarshal(b []byte) error
- type EnableResponse
- func (*EnableResponse) Descriptor() ([]byte, []int)
- func (*EnableResponse) ProtoMessage()
- func (m *EnableResponse) Reset()
- func (m *EnableResponse) String() string
- func (m *EnableResponse) XXX_DiscardUnknown()
- func (m *EnableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EnableResponse) XXX_Merge(src proto.Message)
- func (m *EnableResponse) XXX_Size() int
- func (m *EnableResponse) XXX_Unmarshal(b []byte) error
- type GetStreamStatsRequest
- func (*GetStreamStatsRequest) Descriptor() ([]byte, []int)
- func (*GetStreamStatsRequest) ProtoMessage()
- func (m *GetStreamStatsRequest) Reset()
- func (m *GetStreamStatsRequest) String() string
- func (m *GetStreamStatsRequest) XXX_DiscardUnknown()
- func (m *GetStreamStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetStreamStatsRequest) XXX_Merge(src proto.Message)
- func (m *GetStreamStatsRequest) XXX_Size() int
- func (m *GetStreamStatsRequest) XXX_Unmarshal(b []byte) error
- type GetStreamStatsResponse
- func (*GetStreamStatsResponse) Descriptor() ([]byte, []int)
- func (m *GetStreamStatsResponse) GetStreamStats() []*Stat
- func (*GetStreamStatsResponse) ProtoMessage()
- func (m *GetStreamStatsResponse) Reset()
- func (m *GetStreamStatsResponse) String() string
- func (m *GetStreamStatsResponse) XXX_DiscardUnknown()
- func (m *GetStreamStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetStreamStatsResponse) XXX_Merge(src proto.Message)
- func (m *GetStreamStatsResponse) XXX_Size() int
- func (m *GetStreamStatsResponse) XXX_Unmarshal(b []byte) error
- type ProfilingClient
- type ProfilingServer
- type Stat
- func (*Stat) Descriptor() ([]byte, []int)
- func (m *Stat) GetMetadata() []byte
- func (m *Stat) GetTags() string
- func (m *Stat) GetTimers() []*Timer
- func (*Stat) ProtoMessage()
- func (m *Stat) Reset()
- func (m *Stat) String() string
- func (m *Stat) XXX_DiscardUnknown()
- func (m *Stat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Stat) XXX_Merge(src proto.Message)
- func (m *Stat) XXX_Size() int
- func (m *Stat) XXX_Unmarshal(b []byte) error
- type Timer
- func (*Timer) Descriptor() ([]byte, []int)
- func (m *Timer) GetBeginNsec() int32
- func (m *Timer) GetBeginSec() int64
- func (m *Timer) GetEndNsec() int32
- func (m *Timer) GetEndSec() int64
- func (m *Timer) GetGoId() int64
- func (m *Timer) GetTags() string
- func (*Timer) ProtoMessage()
- func (m *Timer) Reset()
- func (m *Timer) String() string
- func (m *Timer) XXX_DiscardUnknown()
- func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Timer) XXX_Merge(src proto.Message)
- func (m *Timer) XXX_Size() int
- func (m *Timer) XXX_Unmarshal(b []byte) error
- type UnimplementedProfilingServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProfilingServer ¶
func RegisterProfilingServer(s *grpc.Server, srv ProfilingServer)
Types ¶
type EnableRequest ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
EnableRequest defines the fields in a /Profiling/Enable method request to toggle profiling on and off within a gRPC program.
func (*EnableRequest) Descriptor ¶
func (*EnableRequest) Descriptor() ([]byte, []int)
func (*EnableRequest) GetEnabled ¶
func (m *EnableRequest) GetEnabled() bool
func (*EnableRequest) ProtoMessage ¶
func (*EnableRequest) ProtoMessage()
func (*EnableRequest) Reset ¶
func (m *EnableRequest) Reset()
func (*EnableRequest) String ¶
func (m *EnableRequest) String() string
func (*EnableRequest) XXX_DiscardUnknown ¶
func (m *EnableRequest) XXX_DiscardUnknown()
func (*EnableRequest) XXX_Marshal ¶
func (m *EnableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EnableRequest) XXX_Merge ¶
func (m *EnableRequest) XXX_Merge(src proto.Message)
func (*EnableRequest) XXX_Size ¶
func (m *EnableRequest) XXX_Size() int
func (*EnableRequest) XXX_Unmarshal ¶
func (m *EnableRequest) XXX_Unmarshal(b []byte) error
type EnableResponse ¶
type EnableResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
EnableResponse defines the fields in a /Profiling/Enable method response.
func (*EnableResponse) Descriptor ¶
func (*EnableResponse) Descriptor() ([]byte, []int)
func (*EnableResponse) ProtoMessage ¶
func (*EnableResponse) ProtoMessage()
func (*EnableResponse) Reset ¶
func (m *EnableResponse) Reset()
func (*EnableResponse) String ¶
func (m *EnableResponse) String() string
func (*EnableResponse) XXX_DiscardUnknown ¶
func (m *EnableResponse) XXX_DiscardUnknown()
func (*EnableResponse) XXX_Marshal ¶
func (m *EnableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EnableResponse) XXX_Merge ¶
func (m *EnableResponse) XXX_Merge(src proto.Message)
func (*EnableResponse) XXX_Size ¶
func (m *EnableResponse) XXX_Size() int
func (*EnableResponse) XXX_Unmarshal ¶
func (m *EnableResponse) XXX_Unmarshal(b []byte) error
type GetStreamStatsRequest ¶
type GetStreamStatsRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
GetStreamStatsRequest defines the fields in a /Profiling/GetStreamStats method request to retrieve stream-level stats in a gRPC client/server.
func (*GetStreamStatsRequest) Descriptor ¶
func (*GetStreamStatsRequest) Descriptor() ([]byte, []int)
func (*GetStreamStatsRequest) ProtoMessage ¶
func (*GetStreamStatsRequest) ProtoMessage()
func (*GetStreamStatsRequest) Reset ¶
func (m *GetStreamStatsRequest) Reset()
func (*GetStreamStatsRequest) String ¶
func (m *GetStreamStatsRequest) String() string
func (*GetStreamStatsRequest) XXX_DiscardUnknown ¶
func (m *GetStreamStatsRequest) XXX_DiscardUnknown()
func (*GetStreamStatsRequest) XXX_Marshal ¶
func (m *GetStreamStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetStreamStatsRequest) XXX_Merge ¶
func (m *GetStreamStatsRequest) XXX_Merge(src proto.Message)
func (*GetStreamStatsRequest) XXX_Size ¶
func (m *GetStreamStatsRequest) XXX_Size() int
func (*GetStreamStatsRequest) XXX_Unmarshal ¶
func (m *GetStreamStatsRequest) XXX_Unmarshal(b []byte) error
type GetStreamStatsResponse ¶
type GetStreamStatsResponse struct { StreamStats []*Stat `protobuf:"bytes,1,rep,name=stream_stats,json=streamStats,proto3" json:"stream_stats,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
GetStreamStatsResponse defines the fields in a /Profiling/GetStreamStats method response.
func (*GetStreamStatsResponse) Descriptor ¶
func (*GetStreamStatsResponse) Descriptor() ([]byte, []int)
func (*GetStreamStatsResponse) GetStreamStats ¶
func (m *GetStreamStatsResponse) GetStreamStats() []*Stat
func (*GetStreamStatsResponse) ProtoMessage ¶
func (*GetStreamStatsResponse) ProtoMessage()
func (*GetStreamStatsResponse) Reset ¶
func (m *GetStreamStatsResponse) Reset()
func (*GetStreamStatsResponse) String ¶
func (m *GetStreamStatsResponse) String() string
func (*GetStreamStatsResponse) XXX_DiscardUnknown ¶
func (m *GetStreamStatsResponse) XXX_DiscardUnknown()
func (*GetStreamStatsResponse) XXX_Marshal ¶
func (m *GetStreamStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetStreamStatsResponse) XXX_Merge ¶
func (m *GetStreamStatsResponse) XXX_Merge(src proto.Message)
func (*GetStreamStatsResponse) XXX_Size ¶
func (m *GetStreamStatsResponse) XXX_Size() int
func (*GetStreamStatsResponse) XXX_Unmarshal ¶
func (m *GetStreamStatsResponse) XXX_Unmarshal(b []byte) error
type ProfilingClient ¶
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) }
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.
func NewProfilingClient ¶
func NewProfilingClient(cc grpc.ClientConnInterface) ProfilingClient
type ProfilingServer ¶
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) }
ProfilingServer is the server API for Profiling service. All implementations should embed UnimplementedProfilingServer for forward compatibility
type Stat ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A Stat is a collection of Timers along with some additional metadata to tag and identify itself.
func (*Stat) Descriptor ¶
func (*Stat) GetMetadata ¶
func (*Stat) ProtoMessage ¶
func (*Stat) ProtoMessage()
func (*Stat) XXX_DiscardUnknown ¶
func (m *Stat) XXX_DiscardUnknown()
func (*Stat) XXX_Unmarshal ¶
type Timer ¶
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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.
func (*Timer) Descriptor ¶
func (*Timer) GetBeginNsec ¶
func (*Timer) GetBeginSec ¶
func (*Timer) GetEndNsec ¶
func (*Timer) ProtoMessage ¶
func (*Timer) ProtoMessage()
func (*Timer) XXX_DiscardUnknown ¶
func (m *Timer) XXX_DiscardUnknown()
func (*Timer) XXX_Marshal ¶
func (*Timer) XXX_Unmarshal ¶
type UnimplementedProfilingServer ¶
type UnimplementedProfilingServer struct { }
UnimplementedProfilingServer should be embedded to have forward compatible implementations.
func (*UnimplementedProfilingServer) Enable ¶
func (*UnimplementedProfilingServer) Enable(context.Context, *EnableRequest) (*EnableResponse, error)
func (*UnimplementedProfilingServer) GetStreamStats ¶
func (*UnimplementedProfilingServer) GetStreamStats(context.Context, *GetStreamStatsRequest) (*GetStreamStatsResponse, error)