Changelog
+Daniel Stenberg (3 Jul 2008)
+- Introcuding a new timestamp for curl_easy_getinfo():
+ CURLINFO_APPCONNECT_TIME. This is set with the "application layer"
+ handshake/connection is completed. Which typically is SSL, TLS or SSH and 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.
+
Daniel Fandrich (2 Jul 2008)
- Support Open Watcom C on Linux (as well as Windows).
o curl's option parser for boolean options reworked
o Added --remote-name-all
o Now builds for the INTEGRITY operating system
+ o Added CURLINFO_APPCONNECT_TIME
This release includes the following bugfixes:
completed.
.TP
.B time_connect
-The time, in seconds, it took from the start until the connect to the remote
-host (or proxy) was completed.
+The time, in seconds, it took from the start until the TCP connect to the
+remote host (or proxy) was completed.
+.TP
+.B time_appconnect
+The time, in seconds, it took from the start until the SSL/SSH/etc
+connect/handshake to the remote host was completed. (Added in 7.19.0)
.TP
.B time_pretransfer
The time, in seconds, it took from the start until the file transfer is just
.IP CURLINFO_CONNECT_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the
start until the connect to the remote host (or proxy) was completed.
+.IP CURLINFO_APPCONNECT_TIME
+Pass a pointer to a double to receive the time, in seconds, it took from the
+start until the SSL/SSH connect/handshake to the remote host was completed.
+This time is most often very near to the PRETRANSFER time, except for cases
+such as HTTP pippelining where the pretransfer time can be delayed due to
+waits in line for the pipeline and more. (Added in 7.19.0)
.IP CURLINFO_PRETRANSFER_TIME
Pass a pointer to a double to receive the time, in seconds, it took from the
start until the file transfer is just about to begin. This includes all
curl_easy_perform()
|
- |--NT
- |--|--CT
- |--|--|--PT
- |--|--|--|--ST
- |--|--|--|--|--TT
- |--|--|--|--|--RT
+ |--NAMELOOKUP
+ |--|--CONNECT
+ |--|--|--APPCONNECT
+ |--|--|--|--PRETRANSFER
+ |--|--|--|--|--STARTTRANSFER
+ |--|--|--|--|--|--TOTAL
+ |--|--|--|--|--|--REDIRECT
.FI
-.IP NT
+.IP NAMELOOKUP
\fICURLINFO_NAMELOOKUP_TIME\fP. The time it took from the start until the name
resolving was completed.
-.IP CT
+.IP CONNECT
\fICURLINFO_CONNECT_TIME\fP. The time it took from the start until the connect
to the remote host (or proxy) was completed.
-.IP PT
+.IP APPCONNECT
+\fICURLINFO_APPCONNECT_TIME\fP. The time it took from the start until the SSL
+connect/handshake with the remote host was completed. (Added in in 7.19.0)
+.IP PRETRANSFER
\fICURLINFO_PRETRANSFER_TIME\fP. The time it took from the start until the
file transfer is just about to begin. This includes all pre-transfer commands
and negotiations that are specific to the particular protocol(s) involved.
-.IP ST
+.IP STARTTRANSFER
\fICURLINFO_STARTTRANSFER_TIME\fP. The time it took from the start until the
first byte is just about to be transferred.
-.IP TT
+.IP TOTAL
\fICURLINFO_TOTAL_TIME\fP. Total time of the previous request.
-.IP RT
+.IP REDIRECT
\fICURLINFO_REDIRECT_TIME\fP. The time it took for all redirection steps
include name lookup, connect, pretransfer and transfer before final
transaction was started. So, this is zero if no redirection took place.
CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
+ CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
/* Fill in new entries below here! */
- CURLINFO_LASTONE = 32
+ CURLINFO_LASTONE = 33
} CURLINFO;
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
case CURLINFO_CONNECT_TIME:
*param_doublep = data->progress.t_connect;
break;
+ case CURLINFO_APPCONNECT_TIME:
+ *param_doublep = data->progress.t_appconnect;
+ break;
case CURLINFO_PRETRANSFER_TIME:
*param_doublep = data->progress.t_pretransfer;
break;
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
data->progress.t_connect =
Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
break;
+ case TIMER_APPCONNECT:
+ data->progress.t_appconnect =
+ Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
+ break;
case TIMER_PRETRANSFER:
data->progress.t_pretransfer =
Curl_tvdiff_secs(Curl_tvnow(), data->progress.t_startsingle);
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
TIMER_NONE,
TIMER_NAMELOOKUP,
TIMER_CONNECT,
+ TIMER_APPCONNECT,
TIMER_PRETRANSFER,
TIMER_STARTTRANSFER,
TIMER_POSTRANSFER,
*/
infof(data, "Authentication complete\n");
+ Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSH is connected */
+
conn->sockfd = sock;
conn->writesockfd = CURL_SOCKET_BAD;
#include "strequal.h"
#include "url.h"
#include "memory.h"
+#include "progress.h"
/* The last #include file should be: */
#include "memdebug.h"
CURLcode
Curl_ssl_connect(struct connectdata *conn, int sockindex)
{
+ CURLcode res;
/* mark this is being ssl-enabled from here on. */
conn->ssl[sockindex].use = TRUE;
conn->ssl[sockindex].state = ssl_connection_negotiating;
- return curlssl_connect(conn, sockindex);
+ res = curlssl_connect(conn, sockindex);
+
+ if(!res)
+ Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */
+
+ return res;
}
CURLcode
#ifdef curlssl_connect_nonblocking
/* mark this is being ssl requested from here on. */
conn->ssl[sockindex].use = TRUE;
- return Curl_ossl_connect_nonblocking(conn, sockindex, done);
+ return curlssl_connect_nonblocking(conn, sockindex, done);
#else
*done = TRUE; /* fallback to BLOCKING */
conn->ssl[sockindex].use = TRUE;
}
else {
Curl_pgrsTime(data, TIMER_CONNECT); /* we're connected already */
+ Curl_pgrsTime(data, TIMER_APPCONNECT); /* we're connected already */
conn->bits.tcpconnect = TRUE;
*protocol_done = TRUE;
if(data->set.verbose)
double t_nslookup;
double t_connect;
+ double t_appconnect;
double t_pretransfer;
double t_starttransfer;
double t_redirect;
VAR_TOTAL_TIME,
VAR_NAMELOOKUP_TIME,
VAR_CONNECT_TIME,
+ VAR_APPCONNECT_TIME,
VAR_PRETRANSFER_TIME,
VAR_STARTTRANSFER_TIME,
VAR_SIZE_DOWNLOAD,
{"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},
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: