Record Class UtilizationSnapshot.Stats
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.estate.UtilizationSnapshot.Stats
- Record Components:
resourceId- the resource idprovisionedMbps- the provisioned bandwidth the percentages are relative to;nullwhen unknownsamples- the number of intervals with datainterval- the sample interval as the API reported it (for examplePT1H)p50Mbps- the median, ornullwhen unknownp95Mbps- the 95th percentile, ornullwhen unknownpeakMbps- the maximum, ornullwhen unknownunknownReason- why the figures are unknown;nullwhen known
- Enclosing class:
UtilizationSnapshot
public static record UtilizationSnapshot.Stats(String resourceId, Integer provisionedMbps, int samples, String interval, Double p50Mbps, Double p95Mbps, Double peakMbps, String unknownReason)
extends Record
Utilisation of one resource. Rates are in Mbps; each sample is the larger of the transmit and
receive rates for the same interval, because a Fabric connection's bandwidth limit applies to
each direction separately.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.interval()Returns the value of theintervalrecord component.booleanknown()Whether the figures are known.p50Mbps()Returns the value of thep50Mbpsrecord component.p95Mbps()Returns the value of thep95Mbpsrecord component.The 95th percentile as a percent of the provisioned bandwidth.peakMbps()Returns the value of thepeakMbpsrecord component.The peak as a percent of the provisioned bandwidth.Returns the value of theprovisionedMbpsrecord component.static UtilizationSnapshot.StatsReduces samples to percentiles.Returns the value of theresourceIdrecord component.intsamples()Returns the value of thesamplesrecord component.final StringtoString()Returns a string representation of this record class.static UtilizationSnapshot.StatsStats for a resource with no usable data.Returns the value of theunknownReasonrecord component.
-
Constructor Details
-
Stats
public Stats(String resourceId, Integer provisionedMbps, int samples, String interval, Double p50Mbps, Double p95Mbps, Double peakMbps, String unknownReason) Creates an instance of aStatsrecord class.- Parameters:
resourceId- the value for theresourceIdrecord componentprovisionedMbps- the value for theprovisionedMbpsrecord componentsamples- the value for thesamplesrecord componentinterval- the value for theintervalrecord componentp50Mbps- the value for thep50Mbpsrecord componentp95Mbps- the value for thep95Mbpsrecord componentpeakMbps- the value for thepeakMbpsrecord componentunknownReason- the value for theunknownReasonrecord component
-
-
Method Details
-
unknown
public static UtilizationSnapshot.Stats unknown(String resourceId, Integer provisionedMbps, String reason) Stats for a resource with no usable data.- Parameters:
resourceId- the resource idprovisionedMbps- the provisioned bandwidth, ornullreason- why the data is missing- Returns:
- the unknown stats
-
reduce
public static UtilizationSnapshot.Stats reduce(String resourceId, Integer provisionedMbps, String interval, List<Double> samplesMbps) Reduces samples to percentiles. An empty sample list gives unknown stats.- Parameters:
resourceId- the resource idprovisionedMbps- the provisioned bandwidth, ornullinterval- the sample interval label, ornullsamplesMbps- the samples in Mbps (nulls and NaN are ignored)- Returns:
- the stats
-
known
public boolean known()Whether the figures are known.- Returns:
truewhen there is data
-
p95Percent
-
peakPercent
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
resourceId
Returns the value of theresourceIdrecord component.- Returns:
- the value of the
resourceIdrecord component
-
provisionedMbps
Returns the value of theprovisionedMbpsrecord component.- Returns:
- the value of the
provisionedMbpsrecord component
-
samples
-
interval
-
p50Mbps
-
p95Mbps
-
peakMbps
-
unknownReason
Returns the value of theunknownReasonrecord component.- Returns:
- the value of the
unknownReasonrecord component
-