Record Class DistributionSnapshot

java.lang.Object
java.lang.Record
io.trino.execution.DistributionSnapshot
All Implemented Interfaces:
Mergeable<DistributionSnapshot>, Metric<DistributionSnapshot>

public record DistributionSnapshot(long total, double min, double max, double p01, double p05, double p10, double p25, double p50, double p75, double p90, double p95, double p99) extends Record implements Metric<DistributionSnapshot>
  • Constructor Summary

    Constructors
    Constructor
    Description
    DistributionSnapshot(long total, double min, double max, double p01, double p05, double p10, double p25, double p50, double p75, double p90, double p95, double p99)
    Creates an instance of a DistributionSnapshot record class.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    max()
    Returns the value of the max record component.
     
    double
    min()
    Returns the value of the min record component.
    double
    p01()
    Returns the value of the p01 record component.
    double
    p05()
    Returns the value of the p05 record component.
    double
    p10()
    Returns the value of the p10 record component.
    double
    p25()
    Returns the value of the p25 record component.
    double
    p50()
    Returns the value of the p50 record component.
    double
    p75()
    Returns the value of the p75 record component.
    double
    p90()
    Returns the value of the p90 record component.
    double
    p95()
    Returns the value of the p95 record component.
    double
    p99()
    Returns the value of the p99 record component.
     
     
    Returns a string representation of this record class.
    long
    Returns the value of the total record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.trino.spi.Mergeable

    mergeWith
  • Constructor Details

    • DistributionSnapshot

      public DistributionSnapshot(Distribution<?> distribution)
    • DistributionSnapshot

      public DistributionSnapshot(long total, double min, double max, double p01, double p05, double p10, double p25, double p50, double p75, double p90, double p95, double p99)
      Creates an instance of a DistributionSnapshot record class.
      Parameters:
      total - the value for the total record component
      min - the value for the min record component
      max - the value for the max record component
      p01 - the value for the p01 record component
      p05 - the value for the p05 record component
      p10 - the value for the p10 record component
      p25 - the value for the p25 record component
      p50 - the value for the p50 record component
      p75 - the value for the p75 record component
      p90 - the value for the p90 record component
      p95 - the value for the p95 record component
      p99 - the value for the p99 record component
  • Method Details

    • pruneOperatorStats

      public static List<OperatorStats> pruneOperatorStats(List<OperatorStats> operatorStats)
    • pruneOperatorStats

      public static OperatorStats pruneOperatorStats(OperatorStats operatorStats)
    • toString

      public 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
    • mergeWith

      public DistributionSnapshot mergeWith(DistributionSnapshot other)
      Specified by:
      mergeWith in interface Mergeable<DistributionSnapshot>
    • 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. All components in this record class 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.
    • total

      public long total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component
    • min

      public double min()
      Returns the value of the min record component.
      Returns:
      the value of the min record component
    • max

      public double max()
      Returns the value of the max record component.
      Returns:
      the value of the max record component
    • p01

      public double p01()
      Returns the value of the p01 record component.
      Returns:
      the value of the p01 record component
    • p05

      public double p05()
      Returns the value of the p05 record component.
      Returns:
      the value of the p05 record component
    • p10

      public double p10()
      Returns the value of the p10 record component.
      Returns:
      the value of the p10 record component
    • p25

      public double p25()
      Returns the value of the p25 record component.
      Returns:
      the value of the p25 record component
    • p50

      public double p50()
      Returns the value of the p50 record component.
      Returns:
      the value of the p50 record component
    • p75

      public double p75()
      Returns the value of the p75 record component.
      Returns:
      the value of the p75 record component
    • p90

      public double p90()
      Returns the value of the p90 record component.
      Returns:
      the value of the p90 record component
    • p95

      public double p95()
      Returns the value of the p95 record component.
      Returns:
      the value of the p95 record component
    • p99

      public double p99()
      Returns the value of the p99 record component.
      Returns:
      the value of the p99 record component