Class: Google::Apis::CloudprofilerV2::Profile

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudprofiler_v2/classes.rb,
lib/google/apis/cloudprofiler_v2/representations.rb,
lib/google/apis/cloudprofiler_v2/representations.rb

Overview

Profile resource.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Profile

Returns a new instance of Profile.



182
183
184
# File 'lib/google/apis/cloudprofiler_v2/classes.rb', line 182

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#deploymentGoogle::Apis::CloudprofilerV2::Deployment

Deployment contains the deployment identification information. Corresponds to the JSON property deployment



140
141
142
# File 'lib/google/apis/cloudprofiler_v2/classes.rb', line 140

def deployment
  @deployment
end

#durationString

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). Corresponds to the JSON property duration

Returns:

  • (String)


149
150
151
# File 'lib/google/apis/cloudprofiler_v2/classes.rb', line 149

def duration
  @duration
end

#labelsHash<String,String>

Input only. 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. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


156
157
158
# File 'lib/google/apis/cloudprofiler_v2/classes.rb', line 156

def labels
  @labels
end

#nameString

Output only. Opaque, server-assigned, unique ID for this profile. Corresponds to the JSON property name

Returns:

  • (String)


161
162
163
# File 'lib/google/apis/cloudprofiler_v2/classes.rb', line 161

def name
  @name
end

#profile_bytesString

Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto. Corresponds to the JSON property profileBytes NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


168
169
170
# File 'lib/google/apis/cloudprofiler_v2/classes.rb', line 168

def profile_bytes
  @profile_bytes
end

#profile_typeString

Type of profile. For offline mode, this must be specified when creating the profile. For online mode it is assigned and returned by the server. Corresponds to the JSON property profileType

Returns:

  • (String)


174
175
176
# File 'lib/google/apis/cloudprofiler_v2/classes.rb', line 174

def profile_type
  @profile_type
end

#start_timeString

Output only. Start time for the profile. This output is only present in response from the ListProfiles method. Corresponds to the JSON property startTime

Returns:

  • (String)


180
181
182
# File 'lib/google/apis/cloudprofiler_v2/classes.rb', line 180

def start_time
  @start_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



187
188
189
190
191
192
193
194
195
# File 'lib/google/apis/cloudprofiler_v2/classes.rb', line 187

def update!(**args)
  @deployment = args[:deployment] if args.key?(:deployment)
  @duration = args[:duration] if args.key?(:duration)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @profile_bytes = args[:profile_bytes] if args.key?(:profile_bytes)
  @profile_type = args[:profile_type] if args.key?(:profile_type)
  @start_time = args[:start_time] if args.key?(:start_time)
end