Currently this time delta is being collected by atskafka via the analytics named pipe:
TS_MILESTONE_UA_BEGIN_WRITE-TS_MILESTONE_SM_START
TS_MILESTONE_UA_BEGIN_WRITE is emitted by ATS-TLS just before it writes the data to the client socket. Beyond that point, different layers of buffering can happen that may slow down the actual delivery of that data to the client.
I think it would be interesting to collect the remaining communication time between ATS-TLS and the client, using either of those:
TS_MILESTONE_UA_CLOSE - TS_MILESTONE_SM_START TS_MILESTONE_UA_CLOSE - TS_MILESTONE_UA_BEGIN_WRITE
This will give us telemetry about how long it took to ship data to the client and have it acknowledged.
Likewise, we could collect the following in order to sanity check that Varnish takes the amount of time it thinks it does to deliver data to ATS-TLS:
TS_MILESTONE_SERVER_CLOSE - TS_MILESTONE_SERVER_CONNECT
Both of these would give us a more complete picture of where time is spent.