Record Class RouteFactorCalibration

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.geo.RouteFactorCalibration
Record Components:
overall - the catalogue-wide fit
byRegionPair - the per-region-pair fits, keyed AMER/EMEA (names sorted); only pairs with enough data appear
pairsExcluded - measured pairs left out of the fit (floor below MIN_FLOOR_MS, or no coordinates)

public record RouteFactorCalibration(RouteFactorCalibration.Fit overall, Map<String, RouteFactorCalibration.Fit> byRegionPair, int pairsExcluded) extends Record
How much slower real Equinix Fabric round trips are than the straight-fibre physics floor, fitted from the metro pairs Fabric actually measures, so that an unmeasured pair can be estimated from distance with a factor the catalogue itself supports instead of a hard-coded guess.

For every measured pair the ratio measured round trip / great-circle fibre floor is taken (the floor is SpeedOfLightLatency.roundTrip() over the haversine distance). The factor is the median of those ratios, which a few unusual routes cannot drag around. Pairs whose floor is below MIN_FLOOR_MS are left out of the fit: over a few hundred kilometres fixed equipment and handoff delay dominate and the ratio says nothing about routing. A factor is fitted for the whole catalogue and, separately, for every region pair (for example AMER/EMEA) with at least MIN_PAIRS_PER_REGION_PAIR usable pairs; a region pair with fewer falls back to the overall factor.

With no usable measured pair at all the calibration is uncalibrated(): it uses DEFAULT_FACTOR, a single live observation (Fabric SV↔DC 65.8 ms against a 37.6 ms floor, 2026-11-11), and says so in describe().

  • Field Details

    • DEFAULT_FACTOR

      public static final double DEFAULT_FACTOR
      The factor used when nothing can be fitted: Fabric measured SV↔DC at 65.8 ms round trip on 2026-11-11 against a 37.6 ms straight-fibre floor (3,843 km), a ratio of 1.75.
      See Also:
    • MIN_PAIRS_PER_REGION_PAIR

      public static final int MIN_PAIRS_PER_REGION_PAIR
      Fewest usable pairs a region pair needs for its own factor.
      See Also:
    • MIN_FLOOR_MS

      public static final double MIN_FLOOR_MS
      Pairs whose straight-fibre round-trip floor is below this (about 200 km) are not used to fit.
      See Also:
  • Constructor Details

  • Method Details

    • uncalibrated

      public static RouteFactorCalibration uncalibrated()
      Returns:
      the calibration used when no measured pair is available: DEFAULT_FACTOR
    • fit

      Fits the factor from measured pairs. Each pair should appear once (not once per direction).
      Parameters:
      pairs - the measured pairs; non-finite or non-positive figures are ignored
      Returns:
      the calibration; uncalibrated() (with the exclusion count) when no pair is usable
    • fitFor

      public RouteFactorCalibration.Fit fitFor(Region a, Region b)
      Parameters:
      a - one region; may be null
      b - the other region; may be null
      Returns:
      the fit used for a pair of metros in these regions: the region pair's own fit when there is one, otherwise the overall fit
    • estimateRoundTripMs

      public double estimateRoundTripMs(double distanceKm, Region a, Region b)
      Estimates a round trip from distance with the calibrated factor.
      Parameters:
      distanceKm - great-circle distance, km (finite)
      a - region of one end; may be null
      b - region of the other end; may be null
      Returns:
      the estimated round trip in ms
    • isCalibrated

      public boolean isCalibrated()
      Returns:
      true when the factor came from measured pairs rather than DEFAULT_FACTOR
    • describe

      public String describe()
      Returns:
      one sentence stating the factor, what it was fitted from, and any per-region-pair factors
    • regionPairKey

      public static String regionPairKey(Region a, Region b)
      Parameters:
      a - one region
      b - the other region
      Returns:
      the key byRegionPair() uses: the two names sorted and joined with /
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • overall

      public RouteFactorCalibration.Fit overall()
      Returns the value of the overall record component.
      Returns:
      the value of the overall record component
    • byRegionPair

      public Map<String, RouteFactorCalibration.Fit> byRegionPair()
      Returns the value of the byRegionPair record component.
      Returns:
      the value of the byRegionPair record component
    • pairsExcluded

      public int pairsExcluded()
      Returns the value of the pairsExcluded record component.
      Returns:
      the value of the pairsExcluded record component