Class InferContext::RequestTimers

Nested Relationships

This class is a nested type of Class InferContext.

Class Documentation

class RequestTimers

Timer to record the timestamp for different stages of request handling.

Public Types

enum Kind

The kind of the timer.

Values:

REQUEST_START

The start of request handling.

REQUEST_END

The end of request handling.

SEND_START

The start of sending request bytes to the server (i.e. first byte).

SEND_END

The end of sending request bytes to the server (i.e. last byte).

RECEIVE_START

The start of receiving response bytes from the server (i.e.

first byte).

RECEIVE_END

The end of receiving response bytes from the server (i.e.

last byte).

Public Functions

RequestTimers()

Construct a timer with zero-ed timestamps.

Error Reset()

Reset all timestamp values to zero.

Must be called before re-using the timer.

Return
Error object indicating success or failure.

Error Record(Kind kind)

Record the current timestamp for a request stage.

Return
Error object indicating success or failure.
Parameters
  • kind: The Kind of the timestamp.