Google Cloud Profiler V2 Client - Class Profile (1.1.1)

Reference documentation and code samples for the Google Cloud Profiler V2 Client class Profile.

Profile resource.

Generated from protobuf message google.devtools.cloudprofiler.v2.Profile

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. Opaque, server-assigned, unique ID for this profile.

↳ profile_type int

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.

↳ deployment Google\Cloud\Profiler\V2\Deployment

Deployment this profile corresponds to.

↳ duration Google\Protobuf\Duration

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).

↳ profile_bytes string

Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto.

↳ labels array|Google\Protobuf\Internal\MapField

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.

getName

Output only. Opaque, server-assigned, unique ID for this profile.

Returns
TypeDescription
string

setName

Output only. Opaque, server-assigned, unique ID for this profile.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getProfileType

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.

Returns
TypeDescription
int

setProfileType

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.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getDeployment

Deployment this profile corresponds to.

Returns
TypeDescription
Google\Cloud\Profiler\V2\Deployment|null

hasDeployment

clearDeployment

setDeployment

Deployment this profile corresponds to.

Parameter
NameDescription
var Google\Cloud\Profiler\V2\Deployment
Returns
TypeDescription
$this

getDuration

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).

Returns
TypeDescription
Google\Protobuf\Duration|null

hasDuration

clearDuration

setDuration

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).

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getProfileBytes

Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto.

Returns
TypeDescription
string

setProfileBytes

Input only. Profile bytes, as a gzip compressed serialized proto, the format is https://github.com/google/pprof/blob/master/proto/profile.proto.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLabels

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.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

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.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this