Class Timing

java.lang.Object
org.attribyte.api.http.Timing
Direct Known Subclasses:
Stats

public class Timing extends Object
Transaction timing.
  • Field Details

    • timeToRequestStart

      protected final long timeToRequestStart
    • timeToRequestComplete

      protected final long timeToRequestComplete
    • timeToResponseStatus

      protected final long timeToResponseStatus
    • timeToFirstResponseHeader

      protected final long timeToFirstResponseHeader
    • timeToLastResponseHeader

      protected final long timeToLastResponseHeader
    • timeToFirstResponseContent

      protected final long timeToFirstResponseContent
    • timeToCompleteResponse

      protected final long timeToCompleteResponse
  • Constructor Details

    • Timing

      public Timing(long timeToRequestStart, long timeToRequestComplete, long timeToResponseStatus, long timeToFirstResponseHeader, long timeToLastResponseHeader, long timeToFirstResponseContent, long timeToCompleteResponse)
      Creates timing.
      Parameters:
      timeToRequestStart - The time (nanos) the request is waiting to be processed.
      timeToRequestComplete - The time (nanos) for the request to complete after it is started.
      timeToResponseStatus - The time (nanos) before the response status line is received.
      timeToFirstResponseHeader - The time (nanos) before the first response header is received.
      timeToLastResponseHeader - The time (nanos) before the last response header is received.
      timeToFirstResponseContent - The time (nanos) before the first bye of response content is received.
      timeToCompleteResponse - The time (nanos) for the response to be completed, with all bytes read.
  • Method Details

    • timeToRequestStart

      public long timeToRequestStart(TimeUnit timeUnit)
      Gets the time to request start.
      Parameters:
      timeUnit - The desired time unit.
      Returns:
      The time in the requested units.
    • timeToRequestComplete

      public long timeToRequestComplete(TimeUnit timeUnit)
      Gets the time to request complete.
      Parameters:
      timeUnit - The desired time unit.
      Returns:
      The time in the requested units.
    • timeToResponseStatus

      public long timeToResponseStatus(TimeUnit timeUnit)
      Gets the time to response status.
      Parameters:
      timeUnit - The desired time unit.
      Returns:
      The time in the requested units.
    • timeToFirstResponseHeader

      public long timeToFirstResponseHeader(TimeUnit timeUnit)
      Gets the time to the first response header.
      Parameters:
      timeUnit - The desired time unit.
      Returns:
      The time in the requested units.
    • timeToLastResponseHeader

      public long timeToLastResponseHeader(TimeUnit timeUnit)
      Gets the time to the last response header.
      Parameters:
      timeUnit - The desired time unit.
      Returns:
      The time in the requested units.
    • timeToFirstResponseContent

      public long timeToFirstResponseContent(TimeUnit timeUnit)
      Gets the time to the first response content.
      Parameters:
      timeUnit - The desired time unit.
      Returns:
      The time in the requested units.
    • timeToCompleteResponse

      public long timeToCompleteResponse(TimeUnit timeUnit)
      Gets the time to response complete.
      Parameters:
      timeUnit - The desired time unit.
      Returns:
      The time in the requested units.
    • toString

      public String toString()
      Overrides:
      toString in class Object