aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-07-03 06:56:03 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-07-03 06:56:03 +0000
commit7c648782bc7c97be81c619acd8598c38b59c5832 (patch)
tree19083e2f56b425701f0e44abcfe69e60e608aa40 /src
parentee64d14733266ce533eeb3cbc86bd80212527b81 (diff)
Introcuding a new timestamp for curl_easy_getinfo():
CURLINFO_APPCONNECT_TIME. This is set with the "application layer" handshake/connection is completed (typically SSL, TLS or SSH). By using this you can figure out the application layer's own connect time. You can extract the time stamp using curl's -w option and the new variable named 'time_appconnect'. This feature was sponsored by Lenny Rachitsky at NeuStar.
Diffstat (limited to 'src')
-rw-r--r--src/writeout.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/writeout.c b/src/writeout.c
index 2a0e37af2..1e77d062c 100644
--- a/src/writeout.c
+++ b/src/writeout.c
@@ -45,6 +45,7 @@ typedef enum {
VAR_TOTAL_TIME,
VAR_NAMELOOKUP_TIME,
VAR_CONNECT_TIME,
+ VAR_APPCONNECT_TIME,
VAR_PRETRANSFER_TIME,
VAR_STARTTRANSFER_TIME,
VAR_SIZE_DOWNLOAD,
@@ -79,6 +80,7 @@ static const struct variable replacements[]={
{"time_total", VAR_TOTAL_TIME},
{"time_namelookup", VAR_NAMELOOKUP_TIME},
{"time_connect", VAR_CONNECT_TIME},
+ {"time_appconnect", VAR_APPCONNECT_TIME},
{"time_pretransfer", VAR_PRETRANSFER_TIME},
{"time_starttransfer", VAR_STARTTRANSFER_TIME},
{"size_header", VAR_HEADER_SIZE},
@@ -183,14 +185,22 @@ void ourWriteOut(CURL *curl, const char *writeinfo)
curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
break;
+ case VAR_APPCONNECT_TIME:
+ if(CURLE_OK ==
+ curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME,
+ &doubleinfo))
+ fprintf(stream, "%.3f", doubleinfo);
+ break;
case VAR_PRETRANSFER_TIME:
if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &doubleinfo))
+ curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME,
+ &doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
break;
case VAR_STARTTRANSFER_TIME:
if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &doubleinfo))
+ curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
+ &doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
break;
case VAR_SIZE_UPLOAD: