Back to godoc.org

Package cloudprofiler

v0.0.0-...-c2d885f
Latest Go to latest

The latest major version is .

Published: 0 hours ago | License: Apache-2.0 | Module: google.golang.org/genproto

Index

Variables

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

Enum value maps for ProfileType.

var File_google_devtools_cloudprofiler_v2_profiler_proto protoreflect.FileDescriptor

func RegisterProfilerServiceServer

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

type CreateOfflineProfileRequest

type CreateOfflineProfileRequest struct {

	// Parent project to create the profile in.
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Contents of the profile to create.
	Profile *Profile `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile,omitempty"`
	// contains filtered or unexported fields
}

CreateOfflineProfileRequest describes a profile resource offline creation request. Profile field must be set.

func (*CreateOfflineProfileRequest) Descriptor

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

Deprecated: Use CreateOfflineProfileRequest.ProtoReflect.Descriptor instead.

func (*CreateOfflineProfileRequest) GetParent

func (x *CreateOfflineProfileRequest) GetParent() string

func (*CreateOfflineProfileRequest) GetProfile

func (x *CreateOfflineProfileRequest) GetProfile() *Profile

func (*CreateOfflineProfileRequest) ProtoMessage

func (*CreateOfflineProfileRequest) ProtoMessage()

func (*CreateOfflineProfileRequest) ProtoReflect

func (x *CreateOfflineProfileRequest) ProtoReflect() protoreflect.Message

func (*CreateOfflineProfileRequest) Reset

func (x *CreateOfflineProfileRequest) Reset()

func (*CreateOfflineProfileRequest) String

func (x *CreateOfflineProfileRequest) String() string

type CreateProfileRequest

type CreateProfileRequest struct {
	Parent string `protobuf:"bytes,4,opt,name=parent,proto3" json:"parent,omitempty"`

	Deployment *Deployment `protobuf:"bytes,1,opt,name=deployment,proto3" json:"deployment,omitempty"`

	ProfileType []ProfileType "" /* 152 byte string literal not displayed */

}

CreateProfileRequest describes a profile resource online creation request. The deployment field must be populated. 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.

func (*CreateProfileRequest) Descriptor

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

Deprecated: Use CreateProfileRequest.ProtoReflect.Descriptor instead.

func (*CreateProfileRequest) GetDeployment

func (x *CreateProfileRequest) GetDeployment() *Deployment

func (*CreateProfileRequest) GetParent

func (x *CreateProfileRequest) GetParent() string

func (*CreateProfileRequest) GetProfileType

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

func (*CreateProfileRequest) ProtoMessage

func (*CreateProfileRequest) ProtoMessage()

func (*CreateProfileRequest) ProtoReflect

func (x *CreateProfileRequest) ProtoReflect() protoreflect.Message

func (*CreateProfileRequest) Reset

func (x *CreateProfileRequest) Reset()

func (*CreateProfileRequest) String

func (x *CreateProfileRequest) String() string

type Deployment

type Deployment struct {
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`

	Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`

	Labels map[string]string "" /* 153 byte string literal not displayed */

}

Deployment contains the deployment identification information.

func (*Deployment) Descriptor

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

Deprecated: Use Deployment.ProtoReflect.Descriptor instead.

func (*Deployment) GetLabels

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

func (*Deployment) GetProjectId

func (x *Deployment) GetProjectId() string

func (*Deployment) GetTarget

func (x *Deployment) GetTarget() string

func (*Deployment) ProtoMessage

func (*Deployment) ProtoMessage()

func (*Deployment) ProtoReflect

func (x *Deployment) ProtoReflect() protoreflect.Message

func (*Deployment) Reset

func (x *Deployment) Reset()

func (*Deployment) String

func (x *Deployment) String() string

type Profile

type Profile struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`

	ProfileType ProfileType "" /* 145 byte string literal not displayed */

	Deployment *Deployment `protobuf:"bytes,3,opt,name=deployment,proto3" json:"deployment,omitempty"`

	Duration *durationpb.Duration `protobuf:"bytes,4,opt,name=duration,proto3" json:"duration,omitempty"`

	ProfileBytes []byte `protobuf:"bytes,5,opt,name=profile_bytes,json=profileBytes,proto3" json:"profile_bytes,omitempty"`

	Labels map[string]string "" /* 153 byte string literal not displayed */

}

Profile resource.

func (*Profile) Descriptor

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

Deprecated: Use Profile.ProtoReflect.Descriptor instead.

func (*Profile) GetDeployment

func (x *Profile) GetDeployment() *Deployment

func (*Profile) GetDuration

func (x *Profile) GetDuration() *durationpb.Duration

func (*Profile) GetLabels

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

func (*Profile) GetName

func (x *Profile) GetName() string

func (*Profile) GetProfileBytes

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

func (*Profile) GetProfileType

func (x *Profile) GetProfileType() ProfileType

func (*Profile) ProtoMessage

func (*Profile) ProtoMessage()

func (*Profile) ProtoReflect

func (x *Profile) ProtoReflect() protoreflect.Message

func (*Profile) Reset

func (x *Profile) Reset()

func (*Profile) String

func (x *Profile) String() string

type ProfileType

type ProfileType int32

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.

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
	// In-use heap profile. Represents a snapshot of the allocations that are
	// live at the time of the profiling.
	ProfileType_HEAP ProfileType = 3
	// Single-shot collection of all thread stacks.
	ProfileType_THREADS ProfileType = 4
	// Synchronization contention profile.
	ProfileType_CONTENTION ProfileType = 5
	// Peak heap profile.
	ProfileType_PEAK_HEAP ProfileType = 6
	// Heap allocation profile. It represents the aggregation of all allocations
	// made over the duration of the profile. All allocations are included,
	// including those that might have been freed by the end of the profiling
	// interval. The profile is in particular useful for garbage collecting
	// languages to understand which parts of the code create most of the garbage
	// collection pressure to see if those can be optimized.
	ProfileType_HEAP_ALLOC ProfileType = 7
)

func (ProfileType) Descriptor

func (ProfileType) Descriptor() protoreflect.EnumDescriptor

func (ProfileType) Enum

func (x ProfileType) Enum() *ProfileType

func (ProfileType) EnumDescriptor

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

Deprecated: Use ProfileType.Descriptor instead.

func (ProfileType) Number

func (x ProfileType) Number() protoreflect.EnumNumber

func (ProfileType) String

func (x ProfileType) String() string

func (ProfileType) Type

func (ProfileType) Type() protoreflect.EnumType

type ProfilerServiceClient

type ProfilerServiceClient interface {
	// CreateProfile creates a new profile resource in the online 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".
	CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*Profile, error)
	// CreateOfflineProfile creates a new profile resource in the offline mode.
	// The client provides the profile to create along with the profile bytes, the
	// server records it.
	CreateOfflineProfile(ctx context.Context, in *CreateOfflineProfileRequest, opts ...grpc.CallOption) (*Profile, error)
	// UpdateProfile updates the profile bytes and labels on the profile resource
	// created in the online mode. Updating the bytes for profiles created in the
	// offline mode is currently not supported: the profile content must be
	// provided at the time of the profile creation.
	UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*Profile, error)
}

ProfilerServiceClient is the client API for ProfilerService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type ProfilerServiceServer

type ProfilerServiceServer interface {
	// CreateProfile creates a new profile resource in the online 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".
	CreateProfile(context.Context, *CreateProfileRequest) (*Profile, error)
	// CreateOfflineProfile creates a new profile resource in the offline mode.
	// The client provides the profile to create along with the profile bytes, the
	// server records it.
	CreateOfflineProfile(context.Context, *CreateOfflineProfileRequest) (*Profile, error)
	// UpdateProfile updates the profile bytes and labels on the profile resource
	// created in the online mode. Updating the bytes for profiles created in the
	// offline mode is currently not supported: the profile content must be
	// provided at the time of the profile creation.
	UpdateProfile(context.Context, *UpdateProfileRequest) (*Profile, error)
}

ProfilerServiceServer is the server API for ProfilerService service.

type UnimplementedProfilerServiceServer

type UnimplementedProfilerServiceServer struct {
}

UnimplementedProfilerServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedProfilerServiceServer) CreateOfflineProfile

func (*UnimplementedProfilerServiceServer) CreateOfflineProfile(context.Context, *CreateOfflineProfileRequest) (*Profile, error)

func (*UnimplementedProfilerServiceServer) CreateProfile

func (*UnimplementedProfilerServiceServer) CreateProfile(context.Context, *CreateProfileRequest) (*Profile, error)

func (*UnimplementedProfilerServiceServer) UpdateProfile

func (*UnimplementedProfilerServiceServer) UpdateProfile(context.Context, *UpdateProfileRequest) (*Profile, error)

type UpdateProfileRequest

type UpdateProfileRequest struct {

	// Profile to update
	Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
	// Field mask used to specify the fields to be overwritten. Currently only
	// profile_bytes and labels fields are supported by UpdateProfile, so only
	// those fields can be specified in the mask. When no mask is provided, all
	// fields are overwritten.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

UpdateProfileRequest contains the profile to update.

func (*UpdateProfileRequest) Descriptor

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

Deprecated: Use UpdateProfileRequest.ProtoReflect.Descriptor instead.

func (*UpdateProfileRequest) GetProfile

func (x *UpdateProfileRequest) GetProfile() *Profile

func (*UpdateProfileRequest) GetUpdateMask

func (x *UpdateProfileRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateProfileRequest) ProtoMessage

func (*UpdateProfileRequest) ProtoMessage()

func (*UpdateProfileRequest) ProtoReflect

func (x *UpdateProfileRequest) ProtoReflect() protoreflect.Message

func (*UpdateProfileRequest) Reset

func (x *UpdateProfileRequest) Reset()

func (*UpdateProfileRequest) String

func (x *UpdateProfileRequest) String() string

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier