package proto

import "google.golang.org/grpc/profiling/proto"

Index

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) Descriptor() ([]byte, []int)

func (*Stat) GetMetadata

func (m *Stat) GetMetadata() []byte

func (*Stat) GetTags

func (m *Stat) GetTags() string

func (*Stat) GetTimers

func (m *Stat) GetTimers() []*Timer

func (*Stat) ProtoMessage

func (*Stat) ProtoMessage()

func (*Stat) Reset

func (m *Stat) Reset()

func (*Stat) String

func (m *Stat) String() string

func (*Stat) XXX_DiscardUnknown

func (m *Stat) XXX_DiscardUnknown()

func (*Stat) XXX_Marshal

func (m *Stat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Stat) XXX_Merge

func (m *Stat) XXX_Merge(src proto.Message)

func (*Stat) XXX_Size

func (m *Stat) XXX_Size() int

func (*Stat) XXX_Unmarshal

func (m *Stat) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Timer) GetBeginNsec

func (m *Timer) GetBeginNsec() int32

func (*Timer) GetBeginSec

func (m *Timer) GetBeginSec() int64

func (*Timer) GetEndNsec

func (m *Timer) GetEndNsec() int32

func (*Timer) GetEndSec

func (m *Timer) GetEndSec() int64

func (*Timer) GetGoId

func (m *Timer) GetGoId() int64

func (*Timer) GetTags

func (m *Timer) GetTags() string

func (*Timer) ProtoMessage

func (*Timer) ProtoMessage()

func (*Timer) Reset

func (m *Timer) Reset()

func (*Timer) String

func (m *Timer) String() string

func (*Timer) XXX_DiscardUnknown

func (m *Timer) XXX_DiscardUnknown()

func (*Timer) XXX_Marshal

func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Timer) XXX_Merge

func (m *Timer) XXX_Merge(src proto.Message)

func (*Timer) XXX_Size

func (m *Timer) XXX_Size() int

func (*Timer) XXX_Unmarshal

func (m *Timer) XXX_Unmarshal(b []byte) error

type UnimplementedProfilingServer

type UnimplementedProfilingServer struct {
}

UnimplementedProfilingServer should be embedded to have forward compatible implementations.

func (UnimplementedProfilingServer) Enable

func (UnimplementedProfilingServer) GetStreamStats

type UnsafeProfilingServer

type UnsafeProfilingServer interface {
	// contains filtered or unexported methods
}

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.

Source Files

service.pb.go service_grpc.pb.go

Version
v1.34.0-dev
Published
Oct 8, 2020
Platform
linux/amd64
Imports
7 packages
Last checked
3 minutes ago

Tools for package owners.