processone/tsung — pull request #87 by tisba (2014-06-26 10:40:24+00:00)
Title: Reworked Request timings in protocol/protocol_local Dumpfiles

My goal was to have the following timings to the dumpfile (when using: `protocol` or `protocol_local`):

1. **Timestamp of Start**: When was the request started, before a possible TCP connect?
2. **Time to Connect**: How long did it take to establish the TCP connection?
3. **Time to First Byte**: How long did it take to receive the first byte (indication for server processing time)
4. **Request-Response Duration**: Connect + Time to First Byte + Time of Remaining Data Transfer

The time of start (1) was not exposed to the dumpfiles previously, 2. was measured but not exposed either, 3. is measured when the first data is received and the HTTP status is not set (see `ts_http_common:parse`). 4. was already present in dumpfile.

I updated the documentation ("6.1. File structure") to reflect the changes to the dumpfile. I also made it more explicit that the previously existing `date` value is **NOT** the end of the request, but the point in time when the request was logged. That is almost the same most of the time, but it made me almost crazy when I was trying to adding up the numbers :)

I also made the dumpfile output [RFC4180](http://tools.ietf.org/html/rfc4180) compliant and added header to `protocol_local` files.

Please note that I'm an Erlang noob and my changes are probably not very idiomatic Erlang. I appreciate any feedback! When this gets accepted, I'm happy to squash my changes to a single, descriptive commit.