.\" Man page generated from reStructuredText. . .TH "TSHTTPTXNMILESTONEGET" "3ts" "Mar 08, 2019" "7.1" "Apache Traffic Server" .SH NAME TSHttpTxnMilestoneGet \- get a specified milestone timer value for the current transaction . .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 .. .SH SYNOPSIS .sp \fI#include \fP .INDENT 0.0 .TP .B TSReturnCode TSHttpTxnMilestoneGet(TSHttpTxn\fI\ txnp\fP, \fI\%TSMilestonesType\fP\fI\ milestone\fP, TSHRTime *\fI\ time\fP) .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 TSMilestonesType .UNINDENT .TS center; |l|l|. _ T{ Value T} T{ Milestone T} _ T{ \fBTS_MILESTONE_UA_BEGIN\fP T} T{ The client connection is accepted. T} _ T{ \fBTS_MILESTONE_UA_READ_HEADER_DONE\fP T} T{ The request header from the client has been read and parsed. T} _ T{ \fBTS_MILESTONE_UA_BEGIN_WRITE\fP T} T{ The response header write to the client starts. T} _ T{ \fBTS_MILESTONE_UA_CLOSE\fP T} T{ Last I/O activity on the client socket, or connection abort. T} _ T{ \fBTS_MILESTONE_SERVER_FIRST_CONNECT\fP T} T{ First time origin server connect attempted or shared shared session attached. T} _ T{ \fBTS_MILESTONE_SERVER_CONNECT\fP T} T{ Most recent time origin server connect attempted or shared session attached. T} _ T{ \fBTS_MILESTONE_SERVER_CONNECT_END\fP T} T{ More recent time a connection attempt was resolved. T} _ T{ \fBTS_MILESTONE_SERVER_BEGIN_WRITE\fP T} T{ First byte is written to the origin server connection. T} _ T{ \fBTS_MILESTONE_SERVER_FIRST_READ\fP T} T{ First byte is read from connection to origin server. T} _ T{ \fBTS_MILESTONE_SERVER_READ_HEADER_DONE\fP T} T{ Origin server response has been read and parsed. T} _ T{ \fBTS_MILESTONE_SERVER_CLOSE\fP T} T{ Last I/O activity on origin server connection. T} _ T{ \fBTS_MILESTONE_CACHE_OPEN_READ_BEGIN\fP T} T{ Initiate read of the cache. T} _ T{ \fBTS_MILESTONE_CACHE_OPEN_READ_END\fP T} T{ Initial cache read has resolved. T} _ T{ \fBTS_MILESTONE_CACHE_OPEN_WRITE_BEGIN\fP T} T{ Start open for cache write. T} _ T{ \fBTS_MILESTONE_CACHE_OPEN_WRITE_END\fP T} T{ Cache has been opened for write. T} _ T{ \fBTS_MILESTONE_DNS_LOOKUP_BEGIN\fP T} T{ Initiate host resolution in HostDB T} _ T{ \fBTS_MILESTONE_DNS_LOOKUP_END\fP T} T{ Host resolution resolves. T} _ T{ \fBTS_MILESTONE_SM_START\fP T} T{ Transaction state machine is initialized. T} _ T{ \fBTS_MILESTONE_SM_FINISH\fP T} T{ Transaction has finished, state machine final logging has started. T} _ T{ \fBTS_MILESTONE_PLUGIN_ACTIVE\fP T} T{ Amount of time plugins were active plus start time. T} _ T{ \fBTS_MILESTONE_PLUGIN_TOTAL\fP T} T{ Wall time while plugins were active plus start time. T} _ .TE .INDENT 0.0 .IP \(bu 2 The server connect times predate the transmission of the \fI:literal:\(gaSYN\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 \fBTS_MILESTONE_UA_CLOSE\fP and \fBTS_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 \fBTS_MILESTONE_PLUGIN_ACTIVE\fP and \fBTS_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 \fBTS_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 \fBTS_MILESTONE_SM_START\fP\&. .sp \fBTS_MILESTONE_PLUGIN_ACTIVE\fP value is the amount of time the plugin was active, that is performing computation. \fBTS_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 \fBTS_MILESTONE_PLUGIN_TOTAL\fP but not in \fBTS_MILESTONE_PLUGIN_ACTIVE\fP\&. .UNINDENT .SH RETURN VALUES .sp \fBTS_SUCCESS\fP if successful and \fItime\fP was updated, otherwise \fBTS_ERROR\fP\&. .SH SEE ALSO .sp \fBTSAPI(3ts)\fP .SH COPYRIGHT 2019, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .