.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TSHTTPTXNMILESTONEGET" "3ts" "Apr 16, 2024" "9.2" "Apache Traffic Server" .SH NAME TSHttpTxnMilestoneGet \- get a specified milestone timer value for the current transaction .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #include .EE .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fI\%TSReturnCode\fP TSHttpTxnMilestoneGet(\fI\%TSHttpTxn\fP txnp, \fI\%TSMilestonesType\fP milestone, \fI\%TSHRTime\fP *time) .UNINDENT .SH DESCRIPTION .sp \fI\%TSHttpTxnMilestoneGet()\fP will fetch a specific \fImilestone\fP timer value for the transaction \fItxnp\fP\&. These timers are calculated during the lifetime of a transaction and are measured in nanoseconds from the beginning of the transaction. \fItime\fP is used a pointer to storage to update if the call is successful. .INDENT 0.0 .TP .B enum TSMilestonesType An enumeration of the valid indices of transaction milestone data. .INDENT 7.0 .TP .B enumerator TS_MILESTONE_SM_START Transaction state machine is initialized. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_UA_BEGIN The client connection is accepted. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_UA_READ_HEADER_DONE The request header from the client has been read and parsed. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_CACHE_OPEN_READ_BEGIN Initiate read of the cache. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_CACHE_OPEN_READ_END Initial cache read has resolved. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_CACHE_OPEN_WRITE_BEGIN Start open for cache write. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_CACHE_OPEN_WRITE_END Cache has been opened for write. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_DNS_LOOKUP_BEGIN Initiate host resolution in HostDB .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_DNS_LOOKUP_END Host resolution resolves. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_SERVER_FIRST_CONNECT First time origin server connect attempted or shared session attached. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_SERVER_CONNECT Most recent time origin server connect attempted or shared session attached. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_SERVER_CONNECT_END More recent time a connection attempt was resolved. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_SERVER_BEGIN_WRITE First byte is written to the origin server connection. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_SERVER_FIRST_READ First byte is read from connection to origin server. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_SERVER_READ_HEADER_DONE Origin server response has been read and parsed. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_UA_BEGIN_WRITE The response header write to the client starts. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_SERVER_CLOSE Last I/O activity on origin server connection. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_UA_CLOSE Last I/O activity on the client socket, or connection abort. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_SM_FINISH Transaction has finished, state machine final logging has started. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_PLUGIN_ACTIVE Amount of time plugins were active (running plugin code). .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_PLUGIN_TOTAL Amount of time spent in or waiting for plugins. .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_TLS_HANDSHAKE_START Timestamp when the server starts the TLS handshake. 0 if no handshake is performed (connection reuse). .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_TLS_HANDSHAKE_END Timestamp when the server completes the TLS handshake. 0 if no handshake is performed (connection reuse). .UNINDENT .INDENT 7.0 .TP .B enumerator TS_MILESTONE_LAST_ENTRY A pseudo index which is set to be one more than the last valid index. This is useful for looping over the data. .UNINDENT .UNINDENT .INDENT 0.0 .IP \(bu 2 The server connect times predate the transmission of the \fBSYN\fP packet. That is, before a connection to the origin server is completed. .IP \(bu 2 A connection attempt is resolved when no more connection related activity remains to be done, and the connection is either established or has failed. .IP \(bu 2 \fI\%TS_MILESTONE_UA_CLOSE\fP and \fI\%TS_MILESTONE_SERVER_CLOSE\fP are updated continuously during the life of the transaction, every time there is I/O activity. The updating stops when the corresponding connection is closed, leaving the last I/O time as the final value. .IP \(bu 2 The cache \fBOPEN\fP milestones time only the initial setup, the \fIopen\fP, not the full read or write. .IP \(bu 2 \fI\%TS_MILESTONE_PLUGIN_ACTIVE\fP and \fI\%TS_MILESTONE_PLUGIN_TOTAL\fP are different from the other milestones as they measure elapsed time, not event time. The value is the elapsed time \fIplus\fP \fI\%TS_MILESTONE_SM_START\fP\&. This was decided to be more convenient because then these milestones can be handled / displayed in the same way as the other milestones, as offsets from \fI\%TS_MILESTONE_SM_START\fP\&. .sp \fI\%TS_MILESTONE_PLUGIN_ACTIVE\fP value is the amount of time the plugin was active, that is performing computation. \fI\%TS_MILESTONE_PLUGIN_TOTAL\fP is the wall time which includes any time the transaction was blocked while a plugin was active. For instance if a plugin waits on an external event, that waiting time will be in \fI\%TS_MILESTONE_PLUGIN_TOTAL\fP but not in \fI\%TS_MILESTONE_PLUGIN_ACTIVE\fP\&. .UNINDENT .SH RETURN VALUES .sp \fI\%TS_SUCCESS\fP if successful and \fItime\fP was updated, otherwise \fI\%TS_ERROR\fP\&. .SH SEE ALSO .sp \fBTSAPI(3ts)\fP .SH COPYRIGHT 2024, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .