mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
curl -w: added more decimal digits to timing counters
Now showing microsecond resolution. Closes #1106
This commit is contained in:
parent
8ed52bde06
commit
ebeffe81d8
@ -170,41 +170,41 @@ void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo)
|
|||||||
if(CURLE_OK ==
|
if(CURLE_OK ==
|
||||||
curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME,
|
curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME,
|
||||||
&doubleinfo))
|
&doubleinfo))
|
||||||
fprintf(stream, "%.3f", doubleinfo);
|
fprintf(stream, "%.6f", doubleinfo);
|
||||||
break;
|
break;
|
||||||
case VAR_TOTAL_TIME:
|
case VAR_TOTAL_TIME:
|
||||||
if(CURLE_OK ==
|
if(CURLE_OK ==
|
||||||
curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo))
|
curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo))
|
||||||
fprintf(stream, "%.3f", doubleinfo);
|
fprintf(stream, "%.6f", doubleinfo);
|
||||||
break;
|
break;
|
||||||
case VAR_NAMELOOKUP_TIME:
|
case VAR_NAMELOOKUP_TIME:
|
||||||
if(CURLE_OK ==
|
if(CURLE_OK ==
|
||||||
curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME,
|
curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME,
|
||||||
&doubleinfo))
|
&doubleinfo))
|
||||||
fprintf(stream, "%.3f", doubleinfo);
|
fprintf(stream, "%.6f", doubleinfo);
|
||||||
break;
|
break;
|
||||||
case VAR_CONNECT_TIME:
|
case VAR_CONNECT_TIME:
|
||||||
if(CURLE_OK ==
|
if(CURLE_OK ==
|
||||||
curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &doubleinfo))
|
curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &doubleinfo))
|
||||||
fprintf(stream, "%.3f", doubleinfo);
|
fprintf(stream, "%.6f", doubleinfo);
|
||||||
break;
|
break;
|
||||||
case VAR_APPCONNECT_TIME:
|
case VAR_APPCONNECT_TIME:
|
||||||
if(CURLE_OK ==
|
if(CURLE_OK ==
|
||||||
curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME,
|
curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME,
|
||||||
&doubleinfo))
|
&doubleinfo))
|
||||||
fprintf(stream, "%.3f", doubleinfo);
|
fprintf(stream, "%.6f", doubleinfo);
|
||||||
break;
|
break;
|
||||||
case VAR_PRETRANSFER_TIME:
|
case VAR_PRETRANSFER_TIME:
|
||||||
if(CURLE_OK ==
|
if(CURLE_OK ==
|
||||||
curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME,
|
curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME,
|
||||||
&doubleinfo))
|
&doubleinfo))
|
||||||
fprintf(stream, "%.3f", doubleinfo);
|
fprintf(stream, "%.6f", doubleinfo);
|
||||||
break;
|
break;
|
||||||
case VAR_STARTTRANSFER_TIME:
|
case VAR_STARTTRANSFER_TIME:
|
||||||
if(CURLE_OK ==
|
if(CURLE_OK ==
|
||||||
curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
|
curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
|
||||||
&doubleinfo))
|
&doubleinfo))
|
||||||
fprintf(stream, "%.3f", doubleinfo);
|
fprintf(stream, "%.6f", doubleinfo);
|
||||||
break;
|
break;
|
||||||
case VAR_SIZE_UPLOAD:
|
case VAR_SIZE_UPLOAD:
|
||||||
if(CURLE_OK ==
|
if(CURLE_OK ==
|
||||||
|
Loading…
Reference in New Issue
Block a user