Compute V1 Client - Class CapacityHistoryResponsePreemptionRecord (2.14.1)

Reference documentation and code samples for the Compute V1 Client class CapacityHistoryResponsePreemptionRecord.

A record of Spot VM preemption history.

Generated from protobuf message google.cloud.compute.v1.CapacityHistoryResponsePreemptionRecord

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ interval Interval

The time interval for this preemption record.

↳ preemption_rate float

The preemption rate during the interval, representing the fraction of Spot VMs that were preempted. Range: 0.0 to 1.0. Preemption rate is calculated as (total preempted Spots) / (total Spots that stopped running).

getInterval

The time interval for this preemption record.

Returns
Type Description
Interval|null

hasInterval

clearInterval

setInterval

The time interval for this preemption record.

Parameter
Name Description
var Interval
Returns
Type Description
$this

getPreemptionRate

The preemption rate during the interval, representing the fraction of Spot VMs that were preempted. Range: 0.0 to 1.0. Preemption rate is calculated as (total preempted Spots) / (total Spots that stopped running).

Returns
Type Description
float

hasPreemptionRate

clearPreemptionRate

setPreemptionRate

The preemption rate during the interval, representing the fraction of Spot VMs that were preempted. Range: 0.0 to 1.0. Preemption rate is calculated as (total preempted Spots) / (total Spots that stopped running).

Parameter
Name Description
var float
Returns
Type Description
$this