diff -u -r curl-7.10.3.perf/configure.in curl-7.10.3/configure.in --- curl-7.10.3.perf/configure.in 2003-01-15 13:41:01.000000000 -0800 +++ curl-7.10.3/configure.in 2002-12-20 07:54:24.000000000 -0800 @@ -740,22 +740,6 @@ dnl $PATH:/usr/bin/:/usr/local/bin ) dnl AC_SUBST(RANLIB) -AC_MSG_CHECKING([whether to support performance stats]) -AC_ARG_ENABLE(perfstats, -[ --enable-perfstats Enable performance stats capture - --disable-perfstats Disable performance stats capture], -[ case "$enableval" in - no) - AC_MSG_RESULT(no) - ;; - *) AC_MSG_RESULT(yes) - AC_DEFINE(CURL_ENABLE_PERFSTATS, 1, [to enable perfstats ]) - AC_SUBST(CURL_ENABLE_PERFSTATS) - ;; - esac ], - AC_MSG_RESULT(no) -) - dnl ************************************************************ dnl lame option to switch on debug options dnl diff -u -r curl-7.10.3.perf/lib/config.h.in curl-7.10.3/lib/config.h.in --- curl-7.10.3.perf/lib/config.h.in 2003-01-15 13:46:30.000000000 -0800 +++ curl-7.10.3/lib/config.h.in 2002-12-20 07:56:48.000000000 -0800 @@ -111,9 +111,6 @@ /* to disable TELNET */ #undef CURL_DISABLE_TELNET -/* to enable perfstats */ -#undef CURL_ENABLE_PERFSTATS - /* Set to explicitly specify we don't want to use thread-safe functions */ #undef DISABLED_THREADSAFE diff -u -r curl-7.10.3.perf/lib/hostip.c curl-7.10.3/lib/hostip.c --- curl-7.10.3.perf/lib/hostip.c 2003-01-15 14:17:51.000000000 -0800 +++ curl-7.10.3/lib/hostip.c 2002-12-16 03:41:27.000000000 -0800 @@ -541,10 +541,7 @@ struct hostent *h = NULL; in_addr_t in; int ret; /* this variable is unused on several platforms but used on some */ -#ifdef CURL_ENABLE_PERFSTATS - struct timeval start = Curl_tvnow(); - struct timeval stop; -#endif + #define CURL_NAMELOOKUP_SIZE 9000 /* Allocate enough memory to hold the full name information structs and * everything. OSF1 is known to require at least 8872 bytes. The buffer @@ -717,11 +714,6 @@ } #endif } -#ifdef CURL_ENABLE_PERFSTATS - stop = Curl_tvnow(); - data->info.dns_resolv_time += Curl_tvdiff( stop, start); - data->info.dns_count++; -#endif return (h); } diff -u -r curl-7.10.3.perf/lib/sendf.c curl-7.10.3/lib/sendf.c --- curl-7.10.3.perf/lib/sendf.c 2003-01-15 14:48:47.000000000 -0800 +++ curl-7.10.3/lib/sendf.c 2003-01-07 03:23:52.000000000 -0800 @@ -342,9 +342,6 @@ { ssize_t nread; *n=0; /* reset amount to zero */ -#ifdef CURL_ENABLE_PERFSTATS - struct SessionHandle *data = conn->data; -#endif #ifdef USE_SSLEAY if (conn->ssl.use) { @@ -390,12 +387,6 @@ } #endif /* USE_SSLEAY */ *n = nread; -#ifdef CURL_ENABLE_PERFSTATS - if ( data->info.firstbyte.tv_sec ==0 ) { - data->info.firstbyte = Curl_tvnow(); - } - data->info.lastbyte = Curl_tvnow(); -#endif return CURLE_OK; } diff -u -r curl-7.10.3.perf/lib/transfer.c curl-7.10.3/lib/transfer.c --- curl-7.10.3.perf/lib/transfer.c 2003-01-15 15:32:41.000000000 -0800 +++ curl-7.10.3/lib/transfer.c 2003-01-07 08:15:59.000000000 -0800 @@ -1571,11 +1571,6 @@ * performed after this do-while loop. */ -#ifdef CURL_ENABLE_PERFSTATS - data->info.start = Curl_tvnow(); - data->info.last_redirect= Curl_tvnow(); -#endif - do { Curl_pgrsTime(data, TIMER_STARTSINGLE); res = Curl_connect(data, &conn); @@ -1593,21 +1588,12 @@ /* FTPS, enable ssl again after havving transferred data */ conn->ssl.use = TRUE; -#ifdef CURL_ENABLE_PERFSTATS - if (conn->newurl) { - data->info.last_redirect = Curl_tvnow(); - data->info.redirect_count++; - data->info.firstbyte.tv_sec = 0; /* reset firstbyte stat */ - } -#endif - if(res == CURLE_OK) /* * We must duplicate the new URL here as the connection data * may be free()ed in the Curl_done() function. */ newurl = conn->newurl?strdup(conn->newurl):NULL; - else { /* The transfer phase returned error, we mark the connection to get * closed to prevent being re-used. This is becasue we can't @@ -1656,20 +1642,6 @@ if(!res && res2) res = res2; -#ifdef CURL_ENABLE_PERFSTATS - data->info.end = Curl_tvnow(); -#endif - -#ifdef CURL_ENABLE_PERFSTATS - fprintf(stderr,"DEBUG IANH: resolve time %ldms #calls %d\n",data->info.dns_resolv_time, data->info.dns_count); - fprintf(stderr,"DEBUG IANH: connect time %ldms #calls %d\n",data->info.connect_time, data->info.connect_count); - if ( data->info.redirect_count >0 ) - fprintf(stderr,"DEBUG IANH: redirect time %ldms #calls %d\n", Curl_tvdiff( data->info.last_redirect, data->info.start), - data->info.redirect_count ); - fprintf(stderr,"DEBUG IANH: first-byte time %ldms\n", Curl_tvdiff( data->info.firstbyte, data->info.start) ); - fprintf(stderr,"DEBUG IANH: server time %ldms\n", Curl_tvdiff( data->info.lastbyte, data->info.firstbyte) ); - fprintf(stderr,"DEBUG IANH: overall time %ldms\n", Curl_tvdiff( data->info.end, data->info.start) ); -#endif return res; } diff -u -r curl-7.10.3.perf/lib/url.c curl-7.10.3/lib/url.c --- curl-7.10.3.perf/lib/url.c 2003-01-15 14:28:35.000000000 -0800 +++ curl-7.10.3/lib/url.c 2003-01-10 08:19:32.000000000 -0800 @@ -2861,19 +2861,9 @@ CURLcode code; struct connectdata *conn; -#ifdef CURL_ENABLE_PERFSTATS - struct timeval start = Curl_tvnow(); - struct timeval stop; -#endif /* call the stuff that needs to be called */ code = CreateConnection(data, in_connect); -#ifdef CURL_ENABLE_PERFSTATS - stop = Curl_tvnow(); - data->info.connect_time += Curl_tvdiff( stop, start); - data->info.connect_count ++; -#endif - if(CURLE_OK != code) { /* We're not allowed to return failure with memory left allocated in the connectdata struct, free those here */ diff -u -r curl-7.10.3.perf/lib/urldata.h curl-7.10.3/lib/urldata.h --- curl-7.10.3.perf/lib/urldata.h 2003-01-15 15:15:53.000000000 -0800 +++ curl-7.10.3/lib/urldata.h 2003-01-09 08:47:09.000000000 -0800 @@ -499,18 +499,6 @@ long request_size; /* the amount of bytes sent in the request(s) */ char *contenttype; /* the content type of the object */ -#ifdef CURL_ENABLE_PERFSTATS - struct timeval start; /* when we started */ - struct timeval end; /* when we ended */ - long dns_resolv_time; /* amount of time we spent in DNS */ - int dns_count; /* number of times we needed to resolve via DNS */ - long connect_time; /* amount of time we spent trying to 'connect' */ - int connect_count; /* number of times we called connect */ - struct timeval firstbyte; /* when we got the first byte of data */ - struct timeval lastbyte; /* when we got the last byte of data */ - struct timeval last_redirect; /* when we got stopped getting redirected */ - int redirect_count; /* number of times we got redirected */ -#endif };