1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: google/devtools/cloudprofiler/v2/profiler.proto
5 Package cloudprofiler is a generated protocol buffer package.
7 It is generated from these files:
8 google/devtools/cloudprofiler/v2/profiler.proto
10 It has these top-level messages:
18 import proto "github.com/golang/protobuf/proto"
21 import _ "google.golang.org/genproto/googleapis/api/annotations"
22 import google_protobuf1 "github.com/golang/protobuf/ptypes/duration"
23 import _ "github.com/golang/protobuf/ptypes/timestamp"
26 context "golang.org/x/net/context"
27 grpc "google.golang.org/grpc"
30 // Reference imports to suppress errors if they are not otherwise used.
35 // This is a compile-time assertion to ensure that this generated file
36 // is compatible with the proto package it is being compiled against.
37 // A compilation error at this line likely means your copy of the
38 // proto package needs to be updated.
39 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
41 // ProfileType is type of profiling data.
42 // NOTE: the enumeration member names are used (in lowercase) as unique string
43 // identifiers of profile types, so they must not be renamed.
44 type ProfileType int32
47 // Unspecified profile type.
48 ProfileType_PROFILE_TYPE_UNSPECIFIED ProfileType = 0
49 // Thread CPU time sampling.
50 ProfileType_CPU ProfileType = 1
51 // Wallclock time sampling. More expensive as stops all threads.
52 ProfileType_WALL ProfileType = 2
53 // Heap allocation sampling.
54 ProfileType_HEAP ProfileType = 3
55 // Single-shot collection of all thread stacks.
56 ProfileType_THREADS ProfileType = 4
57 // Synchronization contention profile.
58 ProfileType_CONTENTION ProfileType = 5
61 var ProfileType_name = map[int32]string{
62 0: "PROFILE_TYPE_UNSPECIFIED",
69 var ProfileType_value = map[string]int32{
70 "PROFILE_TYPE_UNSPECIFIED": 0,
78 func (x ProfileType) String() string {
79 return proto.EnumName(ProfileType_name, int32(x))
81 func (ProfileType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
83 // CreateProfileRequest describes a profile resource creation request.
84 // Deployment field must be populated for both online and offline modes.
85 // For the online mode, profile field is not set and the profile_type specifies
86 // the list of profile types supported by the agent. The creation call will hang
87 // until a profile of one of these types needs to be collected. For offline
88 // mode, profile field must be set, profile_type must be empty, and deployment
89 // field must be identical to the deployment in the profile.
90 type CreateProfileRequest struct {
91 // Deployment details.
92 Deployment *Deployment `protobuf:"bytes,1,opt,name=deployment" json:"deployment,omitempty"`
93 // Online mode: One or more profile types that the agent is capable of
95 ProfileType []ProfileType `protobuf:"varint,2,rep,packed,name=profile_type,json=profileType,enum=google.devtools.cloudprofiler.v2.ProfileType" json:"profile_type,omitempty"`
96 // Offline mode: Contents of the profile to create.
97 Profile *Profile `protobuf:"bytes,3,opt,name=profile" json:"profile,omitempty"`
100 func (m *CreateProfileRequest) Reset() { *m = CreateProfileRequest{} }
101 func (m *CreateProfileRequest) String() string { return proto.CompactTextString(m) }
102 func (*CreateProfileRequest) ProtoMessage() {}
103 func (*CreateProfileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
105 func (m *CreateProfileRequest) GetDeployment() *Deployment {
112 func (m *CreateProfileRequest) GetProfileType() []ProfileType {
119 func (m *CreateProfileRequest) GetProfile() *Profile {
126 // UpdateProfileRequest contains the profile to update.
127 type UpdateProfileRequest struct {
129 Profile *Profile `protobuf:"bytes,1,opt,name=profile" json:"profile,omitempty"`
132 func (m *UpdateProfileRequest) Reset() { *m = UpdateProfileRequest{} }
133 func (m *UpdateProfileRequest) String() string { return proto.CompactTextString(m) }
134 func (*UpdateProfileRequest) ProtoMessage() {}
135 func (*UpdateProfileRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
137 func (m *UpdateProfileRequest) GetProfile() *Profile {
145 type Profile struct {
146 // Opaque, server-assigned, unique ID for this profile.
148 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
150 // Input (for the offline mode) or output (for the online mode).
151 ProfileType ProfileType `protobuf:"varint,2,opt,name=profile_type,json=profileType,enum=google.devtools.cloudprofiler.v2.ProfileType" json:"profile_type,omitempty"`
152 // Deployment this profile corresponds to.
153 Deployment *Deployment `protobuf:"bytes,3,opt,name=deployment" json:"deployment,omitempty"`
154 // Duration of the profiling session.
155 // Input (for the offline mode) or output (for the online mode).
156 // The field represents requested profiling duration. It may slightly differ
157 // from the effective profiling duration, which is recorded in the profile
158 // data, in case the profiling can't be stopped immediately (e.g. in case
159 // stopping the profiling is handled asynchronously).
160 Duration *google_protobuf1.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration,omitempty"`
161 // Profile bytes, as a gzip compressed serialized proto, the format is
162 // https://github.com/google/pprof/blob/master/proto/profile.proto.
163 ProfileBytes []byte `protobuf:"bytes,5,opt,name=profile_bytes,json=profileBytes,proto3" json:"profile_bytes,omitempty"`
164 // Labels associated to this specific profile. These labels will get merged
165 // with the deployment labels for the final data set.
166 // See documentation on deployment labels for validation rules and limits.
167 // Input only, will not be populated on responses.
168 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"`
171 func (m *Profile) Reset() { *m = Profile{} }
172 func (m *Profile) String() string { return proto.CompactTextString(m) }
173 func (*Profile) ProtoMessage() {}
174 func (*Profile) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
176 func (m *Profile) GetName() string {
183 func (m *Profile) GetProfileType() ProfileType {
187 return ProfileType_PROFILE_TYPE_UNSPECIFIED
190 func (m *Profile) GetDeployment() *Deployment {
197 func (m *Profile) GetDuration() *google_protobuf1.Duration {
204 func (m *Profile) GetProfileBytes() []byte {
206 return m.ProfileBytes
211 func (m *Profile) GetLabels() map[string]string {
218 // Deployment contains the deployment identification information.
219 type Deployment struct {
220 // Project ID is the ID of a cloud project.
221 // Validation regex: `^[a-z][-a-z0-9:.]{4,61}[a-z0-9]$`.
222 ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId" json:"project_id,omitempty"`
223 // Target is the service name used to group related deployments:
224 // * Service name for GAE Flex / Standard.
225 // * Cluster and container name for GKE.
226 // * User-specified string for direct GCE profiling (e.g. Java).
227 // * Job name for Dataflow.
228 // Validation regex: `^[a-z]([-a-z0-9_.]{0,253}[a-z0-9])?$`.
229 Target string `protobuf:"bytes,2,opt,name=target" json:"target,omitempty"`
230 // Labels identify the deployment within the user universe and same target.
231 // Validation regex for label names: `^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`.
232 // Value for an individual label must be <= 512 bytes, the total
233 // size of all label names and values must be <= 1024 bytes.
235 // Either "zone" or "region" label must be present describing the deployment
236 // location. An example of a zone is "us-central1-a", an example of a region
237 // is "us-central1" or "us-central".
238 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"`
241 func (m *Deployment) Reset() { *m = Deployment{} }
242 func (m *Deployment) String() string { return proto.CompactTextString(m) }
243 func (*Deployment) ProtoMessage() {}
244 func (*Deployment) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
246 func (m *Deployment) GetProjectId() string {
253 func (m *Deployment) GetTarget() string {
260 func (m *Deployment) GetLabels() map[string]string {
268 proto.RegisterType((*CreateProfileRequest)(nil), "google.devtools.cloudprofiler.v2.CreateProfileRequest")
269 proto.RegisterType((*UpdateProfileRequest)(nil), "google.devtools.cloudprofiler.v2.UpdateProfileRequest")
270 proto.RegisterType((*Profile)(nil), "google.devtools.cloudprofiler.v2.Profile")
271 proto.RegisterType((*Deployment)(nil), "google.devtools.cloudprofiler.v2.Deployment")
272 proto.RegisterEnum("google.devtools.cloudprofiler.v2.ProfileType", ProfileType_name, ProfileType_value)
275 // Reference imports to suppress errors if they are not otherwise used.
276 var _ context.Context
277 var _ grpc.ClientConn
279 // This is a compile-time assertion to ensure that this generated file
280 // is compatible with the grpc package it is being compiled against.
281 const _ = grpc.SupportPackageIsVersion4
283 // Client API for ProfilerService service
285 type ProfilerServiceClient interface {
286 // CreateProfile creates a new profile resource.
288 // In the online creation mode:
289 // * The server ensures that the new profiles are created at a constant rate
290 // per deployment, so the creation request may hang for some time until the
291 // next profile session is available.
292 // * The request may fail with ABORTED error if the creation is not
293 // available within ~1m, the response will indicate the duration of the
294 // backoff the client should take before attempting creating a profile
295 // again. The backoff duration is returned in google.rpc.RetryInfo extension
296 // on the response status. To a gRPC client, the extension will be return as
297 // a binary-serialized proto in the trailing metadata item named
298 // "google.rpc.retryinfo-bin".
300 // In the offline creation mode:
301 // * The client provides the profile to create along with the profile bytes,
302 // the server records it.
303 CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*Profile, error)
304 // UpdateProfile updates the profile bytes and labels on the profile resource
305 // created in the online mode.
306 UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*Profile, error)
309 type profilerServiceClient struct {
313 func NewProfilerServiceClient(cc *grpc.ClientConn) ProfilerServiceClient {
314 return &profilerServiceClient{cc}
317 func (c *profilerServiceClient) CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*Profile, error) {
319 err := grpc.Invoke(ctx, "/google.devtools.cloudprofiler.v2.ProfilerService/CreateProfile", in, out, c.cc, opts...)
326 func (c *profilerServiceClient) UpdateProfile(ctx context.Context, in *UpdateProfileRequest, opts ...grpc.CallOption) (*Profile, error) {
328 err := grpc.Invoke(ctx, "/google.devtools.cloudprofiler.v2.ProfilerService/UpdateProfile", in, out, c.cc, opts...)
335 // Server API for ProfilerService service
337 type ProfilerServiceServer interface {
338 // CreateProfile creates a new profile resource.
340 // In the online creation mode:
341 // * The server ensures that the new profiles are created at a constant rate
342 // per deployment, so the creation request may hang for some time until the
343 // next profile session is available.
344 // * The request may fail with ABORTED error if the creation is not
345 // available within ~1m, the response will indicate the duration of the
346 // backoff the client should take before attempting creating a profile
347 // again. The backoff duration is returned in google.rpc.RetryInfo extension
348 // on the response status. To a gRPC client, the extension will be return as
349 // a binary-serialized proto in the trailing metadata item named
350 // "google.rpc.retryinfo-bin".
352 // In the offline creation mode:
353 // * The client provides the profile to create along with the profile bytes,
354 // the server records it.
355 CreateProfile(context.Context, *CreateProfileRequest) (*Profile, error)
356 // UpdateProfile updates the profile bytes and labels on the profile resource
357 // created in the online mode.
358 UpdateProfile(context.Context, *UpdateProfileRequest) (*Profile, error)
361 func RegisterProfilerServiceServer(s *grpc.Server, srv ProfilerServiceServer) {
362 s.RegisterService(&_ProfilerService_serviceDesc, srv)
365 func _ProfilerService_CreateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
366 in := new(CreateProfileRequest)
367 if err := dec(in); err != nil {
370 if interceptor == nil {
371 return srv.(ProfilerServiceServer).CreateProfile(ctx, in)
373 info := &grpc.UnaryServerInfo{
375 FullMethod: "/google.devtools.cloudprofiler.v2.ProfilerService/CreateProfile",
377 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
378 return srv.(ProfilerServiceServer).CreateProfile(ctx, req.(*CreateProfileRequest))
380 return interceptor(ctx, in, info, handler)
383 func _ProfilerService_UpdateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
384 in := new(UpdateProfileRequest)
385 if err := dec(in); err != nil {
388 if interceptor == nil {
389 return srv.(ProfilerServiceServer).UpdateProfile(ctx, in)
391 info := &grpc.UnaryServerInfo{
393 FullMethod: "/google.devtools.cloudprofiler.v2.ProfilerService/UpdateProfile",
395 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
396 return srv.(ProfilerServiceServer).UpdateProfile(ctx, req.(*UpdateProfileRequest))
398 return interceptor(ctx, in, info, handler)
401 var _ProfilerService_serviceDesc = grpc.ServiceDesc{
402 ServiceName: "google.devtools.cloudprofiler.v2.ProfilerService",
403 HandlerType: (*ProfilerServiceServer)(nil),
404 Methods: []grpc.MethodDesc{
406 MethodName: "CreateProfile",
407 Handler: _ProfilerService_CreateProfile_Handler,
410 MethodName: "UpdateProfile",
411 Handler: _ProfilerService_UpdateProfile_Handler,
414 Streams: []grpc.StreamDesc{},
415 Metadata: "google/devtools/cloudprofiler/v2/profiler.proto",
418 func init() { proto.RegisterFile("google/devtools/cloudprofiler/v2/profiler.proto", fileDescriptor0) }
420 var fileDescriptor0 = []byte{
421 // 661 bytes of a gzipped FileDescriptorProto
422 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0xd3, 0x40,
423 0x10, 0x66, 0xe3, 0x34, 0x69, 0x27, 0x6d, 0xb1, 0x56, 0x15, 0x32, 0x51, 0x81, 0x28, 0x5c, 0x42,
424 0x44, 0x6d, 0xc9, 0x55, 0x51, 0x5b, 0xc4, 0xa1, 0x4d, 0x5c, 0x35, 0x52, 0x9a, 0x58, 0x6e, 0x2a,
425 0x04, 0x1c, 0x22, 0xa7, 0xde, 0x5a, 0x06, 0xc7, 0x6b, 0xec, 0x4d, 0xa4, 0xa8, 0xea, 0x85, 0x57,
426 0xe0, 0x11, 0xb8, 0xc2, 0xbb, 0x20, 0xf1, 0x0a, 0x3c, 0x00, 0x77, 0x2e, 0xc8, 0xf6, 0x3a, 0x3f,
427 0x50, 0x94, 0x94, 0x72, 0xdb, 0x99, 0x9d, 0xef, 0xdb, 0x6f, 0x66, 0xd7, 0x9f, 0x41, 0xb1, 0x29,
428 0xb5, 0x5d, 0xa2, 0x58, 0x64, 0xc8, 0x28, 0x75, 0x43, 0xe5, 0xdc, 0xa5, 0x03, 0xcb, 0x0f, 0xe8,
429 0x85, 0xe3, 0x92, 0x40, 0x19, 0xaa, 0x4a, 0xba, 0x96, 0xfd, 0x80, 0x32, 0x8a, 0x4b, 0x09, 0x40,
430 0x4e, 0x01, 0xf2, 0x0c, 0x40, 0x1e, 0xaa, 0xc5, 0x4d, 0x4e, 0x69, 0xfa, 0x8e, 0x62, 0x7a, 0x1e,
431 0x65, 0x26, 0x73, 0xa8, 0x17, 0x26, 0xf8, 0xe2, 0x43, 0xbe, 0x1b, 0x47, 0xbd, 0xc1, 0x85, 0x62,
432 0x0d, 0x82, 0xb8, 0x80, 0xef, 0x3f, 0xfa, 0x7d, 0x9f, 0x39, 0x7d, 0x12, 0x32, 0xb3, 0xef, 0x27,
433 0x05, 0xe5, 0x9f, 0x08, 0x36, 0x6a, 0x01, 0x31, 0x19, 0xd1, 0x93, 0x43, 0x0d, 0xf2, 0x7e, 0x40,
434 0x42, 0x86, 0x9b, 0x00, 0x16, 0xf1, 0x5d, 0x3a, 0xea, 0x13, 0x8f, 0x49, 0xa8, 0x84, 0x2a, 0x05,
435 0xf5, 0xa9, 0x3c, 0x4f, 0xae, 0x5c, 0x1f, 0x63, 0x8c, 0x29, 0x3c, 0xd6, 0x61, 0x95, 0x57, 0x75,
436 0xd9, 0xc8, 0x27, 0x52, 0xa6, 0x24, 0x54, 0xd6, 0xd5, 0xad, 0xf9, 0x7c, 0x5c, 0x55, 0x67, 0xe4,
437 0x13, 0xa3, 0xe0, 0x4f, 0x02, 0x5c, 0x83, 0x3c, 0x0f, 0x25, 0x21, 0x16, 0xf7, 0x64, 0x61, 0x32,
438 0x23, 0x45, 0x96, 0xdf, 0xc0, 0xc6, 0x99, 0x6f, 0xfd, 0xd9, 0xfc, 0x14, 0x39, 0xfa, 0x67, 0xf2,
439 0x4f, 0x02, 0xe4, 0x79, 0x12, 0x63, 0xc8, 0x7a, 0x66, 0x3f, 0x61, 0x5b, 0x31, 0xe2, 0xf5, 0x35,
440 0x33, 0x41, 0xb7, 0x9c, 0xc9, 0xec, 0x9d, 0x09, 0xb7, 0xbc, 0xb3, 0x1d, 0x58, 0x4e, 0x5f, 0x93,
441 0x94, 0x8d, 0xb9, 0xee, 0xa7, 0x5c, 0xe9, 0x73, 0x92, 0xeb, 0xbc, 0xc0, 0x18, 0x97, 0xe2, 0xc7,
442 0xb0, 0x96, 0xb6, 0xd5, 0x1b, 0x31, 0x12, 0x4a, 0x4b, 0x25, 0x54, 0x59, 0x35, 0xd2, 0x5e, 0x0f,
443 0xa3, 0x1c, 0x3e, 0x81, 0x9c, 0x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