Record Class Reading

java.lang.Object
java.lang.Record
org.acemq.workloads.endurance.Reading
Record Components:
epoch - seconds since the epoch
phase - baseline, cycling or final
lang - the client's name
rssKb - resident memory in kB
fds - open file descriptors
threads - threads
published - the load's own cumulative counter, -1 when unreadable
consumed - likewise
connections - connections on the whole cluster at the time, -1 when unreadable

public record Reading(long epoch, String phase, String lang, long rssKb, long fds, long threads, long published, long consumed, long connections) extends Record
One client, read once from outside: one line of the readings TSV.

A client that is gone is recorded rather than skipped, with zeros and -1 counters, because a dead load has to reach the verdict: the one thing it cannot do is grow.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The TSV header, unchanged from the script that first wrote it.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Reading(long epoch, String phase, String lang, long rssKb, long fds, long threads, long published, long consumed, long connections)
    Creates an instance of a Reading record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the connections record component.
    long
    Returns the value of the consumed record component.
    long
    Returns the value of the epoch record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    fds()
    Returns the value of the fds record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the lang record component.
    static Reading
    parse(String line)
     
    Returns the value of the phase record component.
    long
    Returns the value of the published record component.
    long
    Returns the value of the rssKb record component.
    long
    Returns the value of the threads record component.
    final String
    Returns a string representation of this record class.
    tsv()
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • Reading

      public Reading(long epoch, String phase, String lang, long rssKb, long fds, long threads, long published, long consumed, long connections)
      Creates an instance of a Reading record class.
      Parameters:
      epoch - the value for the epoch record component
      phase - the value for the phase record component
      lang - the value for the lang record component
      rssKb - the value for the rssKb record component
      fds - the value for the fds record component
      threads - the value for the threads record component
      published - the value for the published record component
      consumed - the value for the consumed record component
      connections - the value for the connections record component
  • Method Details

    • tsv

      public String tsv()
      Returns:
      this reading as a TSV line, without the newline
    • parse

      public static Reading parse(String line)
      Returns:
      the reading a TSV line holds, or null for a header or a malformed line
    • 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 '=='.
      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.
    • epoch

      public long epoch()
      Returns the value of the epoch record component.
      Returns:
      the value of the epoch record component
    • phase

      public String phase()
      Returns the value of the phase record component.
      Returns:
      the value of the phase record component
    • lang

      public String lang()
      Returns the value of the lang record component.
      Returns:
      the value of the lang record component
    • rssKb

      public long rssKb()
      Returns the value of the rssKb record component.
      Returns:
      the value of the rssKb record component
    • fds

      public long fds()
      Returns the value of the fds record component.
      Returns:
      the value of the fds record component
    • threads

      public long threads()
      Returns the value of the threads record component.
      Returns:
      the value of the threads record component
    • published

      public long published()
      Returns the value of the published record component.
      Returns:
      the value of the published record component
    • consumed

      public long consumed()
      Returns the value of the consumed record component.
      Returns:
      the value of the consumed record component
    • connections

      public long connections()
      Returns the value of the connections record component.
      Returns:
      the value of the connections record component