Google Cloud Profiler V2 Client - Class Profile (2.0.0-RC1)

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

Namespace

Google \ Cloud \ Profiler \ V2

Methods

__construct

Constructor.

Parameters
Name Description
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.

↳ start_time Google\Protobuf\Timestamp

Output only. Start time for the profile. This output is only present in response from the ListProfiles method.

getName

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

Returns
Type Description
string

setName

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

Parameter
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var int
Returns
Type Description
$this

getDeployment

Deployment this profile corresponds to.

Returns
Type Description
Google\Cloud\Profiler\V2\Deployment|null

hasDeployment

clearDeployment

setDeployment

Deployment this profile corresponds to.

Parameter
Name Description
var Google\Cloud\Profiler\V2\Deployment
Returns
Type Description
$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
Type Description
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
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$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
Type Description
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
Name Description
var string
Returns
Type Description
$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
Type Description
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
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getStartTime

Output only. Start time for the profile.

This output is only present in response from the ListProfiles method.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasStartTime

clearStartTime

setStartTime

Output only. Start time for the profile.

This output is only present in response from the ListProfiles method.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this