cloudprofiler - ActiveState ActiveGo 1.8
...

Package cloudprofiler

import "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2"
Overview
Index

Overview ▾

Package cloudprofiler is a generated protocol buffer package.

It is generated from these files:

google/devtools/cloudprofiler/v2/profiler.proto

It has these top-level messages:

CreateProfileRequest
UpdateProfileRequest
Profile
Deployment

Index ▾

Variables
func RegisterProfilerServiceServer(s *grpc.Server, srv ProfilerServiceServer)
type CreateProfileRequest
    func (*CreateProfileRequest) Descriptor() ([]byte, []int)
    func (m *CreateProfileRequest) GetDeployment() *Deployment
    func (m *CreateProfileRequest) GetProfile() *Profile
    func (m *CreateProfileRequest) GetProfileType() []ProfileType
    func (*CreateProfileRequest) ProtoMessage()
    func (m *CreateProfileRequest) Reset()
    func (m *CreateProfileRequest) String() string
type Deployment
    func (*Deployment) Descriptor() ([]byte, []int)
    func (m *Deployment) GetLabels() map[string]string
    func (m *Deployment) GetProjectId() string
    func (m *Deployment) GetTarget() string
    func (*Deployment) ProtoMessage()
    func (m *Deployment) Reset()
    func (m *Deployment) String() string
type Profile
    func (*Profile) Descriptor() ([]byte, []int)
    func (m *Profile) GetDeployment() *Deployment
    func (m *Profile) GetDuration() *google_protobuf1.Duration
    func (m *Profile) GetLabels() map[string]string
    func (m *Profile) GetName() string
    func (m *Profile) GetProfileBytes() []byte
    func (m *Profile) GetProfileType() ProfileType
    func (*Profile) ProtoMessage()
    func (m *Profile) Reset()
    func (m *Profile) String() string
type ProfileType
    func (ProfileType) EnumDescriptor() ([]byte, []int)
    func (x ProfileType) String() string
type ProfilerServiceClient
    func NewProfilerServiceClient(cc *grpc.ClientConn) ProfilerServiceClient
type ProfilerServiceServer
type UpdateProfileRequest
    func (*UpdateProfileRequest) Descriptor() ([]byte, []int)
    func (m *UpdateProfileRequest) GetProfile() *Profile
    func (*UpdateProfileRequest) ProtoMessage()
    func (m *UpdateProfileRequest) Reset()
    func (m *UpdateProfileRequest) String() string

Package files

profiler.pb.go

Variables

var ProfileType_name = map[int32]string{
    0: "PROFILE_TYPE_UNSPECIFIED",
    1: "CPU",
    2: "WALL",
    3: "HEAP",
    4: "THREADS",
    5: "CONTENTION",
}
var ProfileType_value = map[string]int32{
    "PROFILE_TYPE_UNSPECIFIED": 0,
    "CPU":        1,
    "WALL":       2,
    "HEAP":       3,
    "THREADS":    4,
    "CONTENTION": 5,
}

func RegisterProfilerServiceServer

func RegisterProfilerServiceServer(s *grpc.Server, srv ProfilerServiceServer)

type CreateProfileRequest

CreateProfileRequest describes a profile resource creation request. Deployment field must be populated for both online and offline modes. For the online mode, profile field is not set and the profile_type specifies the list of profile types supported by the agent. The creation call will hang until a profile of one of these types needs to be collected. For offline mode, profile field must be set, profile_type must be empty, and deployment field must be identical to the deployment in the profile.

type CreateProfileRequest struct {
    // Deployment details.
    Deployment *Deployment `protobuf:"bytes,1,opt,name=deployment" json:"deployment,omitempty"`
    // Online mode: One or more profile types that the agent is capable of
    // providing.
    ProfileType []ProfileType `protobuf:"varint,2,rep,packed,name=profile_type,json=profileType,enum=google.devtools.cloudprofiler.v2.ProfileType" json:"profile_type,omitempty"`
    // Offline mode: Contents of the profile to create.
    Profile *Profile `protobuf:"bytes,3,opt,name=profile" json:"profile,omitempty"`
}

func (*CreateProfileRequest) Descriptor

func (*CreateProfileRequest) Descriptor() ([]byte, []int)

func (*CreateProfileRequest) GetDeployment

func (m *CreateProfileRequest) GetDeployment() *Deployment

func (*CreateProfileRequest) GetProfile

func (m *CreateProfileRequest) GetProfile() *Profile

func (*CreateProfileRequest) GetProfileType

func (m *CreateProfileRequest) GetProfileType() []ProfileType

func (*CreateProfileRequest) ProtoMessage

func (*CreateProfileRequest) ProtoMessage()

func (*CreateProfileRequest) Reset

func (m *CreateProfileRequest) Reset()

func (*CreateProfileRequest) String

func (m *CreateProfileRequest) String() string

type Deployment

Deployment contains the deployment identification information.

type Deployment struct {
    // Project ID is the ID of a cloud project.
    // Validation regex: `^[a-z][-a-z0-9:.]{4,61}[a-z0-9]$`.
    ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
    // Target is the service name used to group related deployments:
    // * Service name for GAE Flex / Standard.
    // * Cluster and container name for GKE.
    // * User-specified string for direct GCE profiling (e.g. Java).
    // * Job name for Dataflow.
    // Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`.
    Target string `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"`
    // Labels identify the deployment within the user universe and same target.
    // Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
    // Value for an individual label must be <= 512 bytes, the total
    // size of all label names and values must be <= 1024 bytes.
    //
    // Either "zone" or "region" label must be present describing the deployment
    // location. An example of a zone is "us-central1-a", an example of a region
    // is "us-central1" or "us-central".
    Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}

func (*Deployment) Descriptor

func (*Deployment) Descriptor() ([]byte, []int)

func (*Deployment) GetLabels

func (m *Deployment) GetLabels() map[string]string

func (*Deployment) GetProjectId

func (m *Deployment) GetProjectId() string

func (*Deployment) GetTarget

func (m *Deployment) GetTarget() string

func (*Deployment) ProtoMessage

func (*Deployment) ProtoMessage()

func (*Deployment) Reset

func (m *Deployment) Reset()

func (*Deployment) String

func (m *Deployment) String() string

type Profile

Profile resource.

type Profile struct {
    // Opaque, server-assigned, unique ID for this profile.
    // Output only.
    Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
    // Type of profile.
    // Input (for the offline mode) or output (for the online mode).
    ProfileType ProfileType `protobuf:"varint,2,opt,name=profile_type,json=profileType,enum=google.devtools.cloudprofiler.v2.ProfileType" json:"profile_type,omitempty"`
    // Deployment this profile corresponds to.
    Deployment *Deployment `protobuf:"bytes,3,opt,name=deployment" json:"deployment,omitempty"`
    // Duration of the profiling session.
    // Input (for the offline mode) or output (for the online mode).
    // The field represents requested profiling duration. It may slightly differ
    // from the effective profiling duration, which is recorded in the profile
    // data, in case the profiling can't be stopped immediately (e.g. in case
    // stopping the profiling is handled asynchronously).
    Duration *google_protobuf1.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration,omitempty"`
    // Profile bytes, as a gzip compressed serialized proto, the format is
    // https://github.com/google/pprof/blob/master/proto/profile.proto.
    ProfileBytes []byte `protobuf:"bytes,5,opt,name=profile_bytes,json=profileBytes,proto3" json:"profile_bytes,omitempty"`
    // Labels associated to this specific profile. These labels will get merged
    // with the deployment labels for the final data set.
    // See documentation on deployment labels for validation rules and limits.
    // Input only, will not be populated on responses.
    Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}

func (*Profile) Descriptor

func (*Profile) Descriptor() ([]byte, []int)

func (*Profile) GetDeployment

func (m *Profile) GetDeployment() *Deployment

func (*Profile) GetDuration

func (m *Profile) GetDuration() *google_protobuf1.Duration

func (*Profile) GetLabels

func (m *Profile) GetLabels() map[string]string

func (*Profile) GetName

func (m *Profile) GetName() string

func (*Profile) GetProfileBytes

func (m *Profile) GetProfileBytes() []byte

func (*Profile) GetProfileType

func (m *Profile) GetProfileType() ProfileType

func (*Profile) ProtoMessage

func (*Profile) ProtoMessage()

func (*Profile) Reset

func (m *Profile) Reset()

func (*Profile) String

func (m *Profile) String() string

type ProfileType

ProfileType is type of profiling data. NOTE: the enumeration member names are used (in lowercase) as unique string identifiers of profile types, so they must not be renamed.

type ProfileType int32
const (
    // Unspecified profile type.
    ProfileType_PROFILE_TYPE_UNSPECIFIED ProfileType = 0
    // Thread CPU time sampling.
    ProfileType_CPU ProfileType = 1
    // Wallclock time sampling. More expensive as stops all threads.
    ProfileType_WALL ProfileType = 2
    // Heap allocation sampling.
    ProfileType_HEAP ProfileType = 3
    // Single-shot collection of all thread stacks.
    ProfileType_THREADS ProfileType = 4
    // Synchronization contention profile.
    ProfileType_CONTENTION ProfileType = 5
)

func (ProfileType) EnumDescriptor

func (ProfileType) EnumDescriptor() ([]byte, []int)

func (ProfileType) String

func (x ProfileType) String() string

type ProfilerServiceClient

type ProfilerServiceClient interface {
    // CreateProfile creates a new profile resource.
    //
    // In the online creation mode:
    // * The server ensures that the new profiles are created at a constant rate
    //   per deployment, so the creation request may hang for some time until the
    //   next profile session is available.
    // * The request may fail with ABORTED error if the creation is not
    //   available within ~1m, the response will indicate the duration of the
    //   backoff the client should take before attempting creating a profile
    //   again. The backoff duration is returned in google.rpc.RetryInfo extension
    //   on the response status. To a gRPC client, the extension will be return as
    //   a binary-serialized proto in the trailing metadata item named
    //   "google.rpc.retryinfo-bin".
    //
    // In the offline creation mode:
    // * The client provides the profile to create along with the profile bytes,
    //   the server records it.
    CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*Profile, error)
    // UpdateProfile updates the profile bytes and labels on the profile resource
    // created in the online mode.
    UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*Profile, error)
}

func NewProfilerServiceClient

func NewProfilerServiceClient(cc *grpc.ClientConn) ProfilerServiceClient

type ProfilerServiceServer

type ProfilerServiceServer interface {
    // CreateProfile creates a new profile resource.
    //
    // In the online creation mode:
    // * The server ensures that the new profiles are created at a constant rate
    //   per deployment, so the creation request may hang for some time until the
    //   next profile session is available.
    // * The request may fail with ABORTED error if the creation is not
    //   available within ~1m, the response will indicate the duration of the
    //   backoff the client should take before attempting creating a profile
    //   again. The backoff duration is returned in google.rpc.RetryInfo extension
    //   on the response status. To a gRPC client, the extension will be return as
    //   a binary-serialized proto in the trailing metadata item named
    //   "google.rpc.retryinfo-bin".
    //
    // In the offline creation mode:
    // * The client provides the profile to create along with the profile bytes,
    //   the server records it.
    CreateProfile(context.Context, *CreateProfileRequest) (*Profile, error)
    // UpdateProfile updates the profile bytes and labels on the profile resource
    // created in the online mode.
    UpdateProfile(context.Context, *UpdateProfileRequest) (*Profile, error)
}

type UpdateProfileRequest

UpdateProfileRequest contains the profile to update.

type UpdateProfileRequest struct {
    // Profile to update
    Profile *Profile `protobuf:"bytes,1,opt,name=profile" json:"profile,omitempty"`
}

func (*UpdateProfileRequest) Descriptor

func (*UpdateProfileRequest) Descriptor() ([]byte, []int)

func (*UpdateProfileRequest) GetProfile

func (m *UpdateProfileRequest) GetProfile() *Profile

func (*UpdateProfileRequest) ProtoMessage

func (*UpdateProfileRequest) ProtoMessage()

func (*UpdateProfileRequest) Reset

func (m *UpdateProfileRequest) Reset()

func (*UpdateProfileRequest) String

func (m *UpdateProfileRequest) String() string