TSHttpTxnMilestoneGet

Get a specified :arg:`milestone` timer value for the current transaction.

Synopsis

#include <ts/ts.h>

TSReturnCode TSHttpTxnMilestoneGet(TSHttpTxn txnp, TSMilestonesType milestone, TSHRTime * time)

Description

TSHttpTxnMilestoneGet() will fetch a specific :arg:`milestone` timer value for the transaction :arg:`txnp`. These timers are calculated during the lifetime of a transaction and are measured in nanoseconds from the beginning of the transaction. :arg:`time` is used a pointer to storage to update if the call is successful.

TSMilestonesType
Value Milestone
:const:`TS_MILESTONE_UA_BEGIN` The client connection is accepted.
:const:`TS_MILESTONE_UA_READ_HEADER_DONE` The request header from the client has been read and parsed.
:const:`TS_MILESTONE_UA_BEGIN_WRITE` The response header write to the client starts.
:const:`TS_MILESTONE_UA_CLOSE` Last I/O activity on the client socket, or connection abort.
:const:`TS_MILESTONE_SERVER_FIRST_CONNECT` First time origin server connect attempted or shared shared session attached.
:const:`TS_MILESTONE_SERVER_CONNECT` Most recent time origin server connect attempted or shared session attached.
:const:`TS_MILESTONE_SERVER_CONNECT_END` More recent time a connection attempt was resolved.
:const:`TS_MILESTONE_SERVER_BEGIN_WRITE` First byte is written to the origin server connection.
:const:`TS_MILESTONE_SERVER_FIRST_READ` First byte is read from connection to origin server.
:const:`TS_MILESTONE_SERVER_READ_HEADER_DONE` Origin server response has been read and parsed.
:const:`TS_MILESTONE_SERVER_CLOSE` Last I/O activity on origin server connection.
:const:`TS_MILESTONE_CACHE_OPEN_READ_BEGIN` Initiate read of the cache.
:const:`TS_MILESTONE_CACHE_OPEN_READ_END` Initial cache read has resolved.
:const:`TS_MILESTONE_CACHE_OPEN_WRITE_BEGIN` Start open for cache write.
:const:`TS_MILESTONE_CACHE_OPEN_WRITE_END` Cache has been opened for write.
:const:`TS_MILESTONE_DNS_LOOKUP_BEGIN` Initiate host resolution in HostDB
:const:`TS_MILESTONE_DNS_LOOKUP_END` Host resolution resolves.
:const:`TS_MILESTONE_SM_START` Transaction state machine is initialized.
:const:`TS_MILESTONE_SM_FINISH` Transaction has finished, state machine final logging has started.
:const:`TS_MILESTONE_PLUGIN_ACTIVE` Amount of time plugins were active plus start time.
:const:`TS_MILESTONE_PLUGIN_TOTAL` Wall time while plugins were active plus start time.

Return Values

:const:`TS_SUCCESS` if successful and :arg:`time` was updated, otherwise :const:`TS_ERROR`.

See Also

TSAPI(3ts)