Get a specified milestone timer value for the current transaction.
TSHttpTxnMilestoneGet() will fetch a specific milestone timer
value for the transaction txnp. These timers are calculated during the
lifetime of a transaction and are measured in nanoseconds from the beginning of
the transaction. time is used a pointer to storage to update if the call
An enumeration of the valid indices of transaction milestone data.
Transaction state machine is initialized.
The client connection is accepted.
Amount of time plugins were active plus start time.
Wall time while plugins were active plus start time.
The request header from the client has been read and parsed.
Initiate read of the cache.
Initial cache read has resolved.
Start open for cache write.
Cache has been opened for write.
Initiate host resolution in HostDB
Host resolution resolves.
First time origin server connect attempted or shared shared session attached.
Most recent time origin server connect attempted or shared session attached.
More recent time a connection attempt was resolved.
First byte is written to the origin server connection.
First byte is read from connection to origin server.
Origin server response has been read and parsed.
The response header write to the client starts.
Last I/O activity on origin server connection.
Last I/O activity on the client socket, or connection abort.
Transaction has finished, state machine final logging has started.
Amount of time plugins were active (running plugin code).
Amount of time spent in or waiting for plugins.
A psuedo index which is set to be one more than the last valid index. This is useful for looping over the data.
The server connect times predate the transmission of the
SYNpacket. That is, before a connection to the origin server is completed.
A connection attempt is resolved when no more connection related activity remains to be done, and the connection is either established or has failed.
TS_MILESTONE_SERVER_CLOSEare 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.
OPENmilestones time only the initial setup, the open, not the full read or write.
TS_MILESTONE_PLUGIN_TOTALare different from the other milestones as they measure elapsed time, not event time. The value is the elapsed time plus
TS_MILESTONE_SM_START. 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
TS_MILESTONE_PLUGIN_ACTIVEvalue is the amount of time the plugin was active, that is performing computation.
TS_MILESTONE_PLUGIN_TOTALis 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
TS_MILESTONE_PLUGIN_TOTALbut not in