Class LatencyMatrix
java.lang.Object
com.eqixiac.equinix.design.optimizer.model.LatencyMatrix
A metro-by-site latency grid. Provides indexed access and formatted
output for architecture review documents.
A matrix built for a request with no user sites has a row per metro but no columns:
there is nothing to measure latency to. The OptionalDouble-returning
accessors (worstCaseMs, averageMs) report that as an absent value rather
than as a number, so callers cannot mistake "not measurable" for a measurement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAverage latency in milliseconds from a metro to all sites.Retrieves the latency entry for a specific metro-site pair.booleanhasSites()Returnstruewhen this matrix has at least one site column, i.e. when its latency figures are measurable at all.Renders the latency matrix as an ASCII table suitable for console output or inclusion in markdown reports.worstCaseMs(MetroId metro) Worst-case latency in milliseconds from a metro to any site.
-
Constructor Details
-
LatencyMatrix
public LatencyMatrix()
-
-
Method Details
-
get
Retrieves the latency entry for a specific metro-site pair. -
hasSites
public boolean hasSites()Returnstruewhen this matrix has at least one site column, i.e. when its latency figures are measurable at all. When this isfalse,worstCaseMsandaverageMsare empty for every metro andtoTableString()renders the empty placeholder. -
worstCaseMs
Worst-case latency in milliseconds from a metro to any site.- Parameters:
metro- the metro to measure from- Returns:
- the highest latency to any site, or
OptionalDouble.empty()when the metro is not in this matrix or the request defined no sites
-
averageMs
Average latency in milliseconds from a metro to all sites.- Parameters:
metro- the metro to measure from- Returns:
- the mean latency across all sites, or
OptionalDouble.empty()when the metro is not in this matrix or the request defined no sites
-
toTableString
Renders the latency matrix as an ASCII table suitable for console output or inclusion in markdown reports.
-