Class SimpleDurationFormat

java.lang.Object
org.apache.drill.exec.server.rest.profile.SimpleDurationFormat

public class SimpleDurationFormat extends Object
Representation of a millisecond duration in a human-readable format
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimpleDurationFormat(long startTimeMillis, long endTimeMillis)
    If end time is less than the start time, current epoch time is assumed as the end time.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return a compact representation of elapsed time with only the most significant time units and no spaces
    Return a verbose representation of elapsed time down to millisecond granularity

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SimpleDurationFormat

      public SimpleDurationFormat(long startTimeMillis, long endTimeMillis)
      If end time is less than the start time, current epoch time is assumed as the end time.
      Parameters:
      startTimeMillis -
      endTimeMillis -
  • Method Details

    • compact

      public String compact()
      Return a compact representation of elapsed time with only the most significant time units and no spaces
      Returns:
      duration
    • verbose

      public String verbose()
      Return a verbose representation of elapsed time down to millisecond granularity
      Returns:
      duration