1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

curl -w: added more decimal digits to timing counters

Now showing microsecond resolution.

Closes #1106
This commit is contained in:
Mauro Rappa 2016-11-04 14:45:49 +00:00 committed by Daniel Stenberg
parent 8ed52bde06
commit ebeffe81d8

View File

@ -170,41 +170,41 @@ void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo)
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME,
&doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
fprintf(stream, "%.6f", doubleinfo);
break;
case VAR_TOTAL_TIME:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
fprintf(stream, "%.6f", doubleinfo);
break;
case VAR_NAMELOOKUP_TIME:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME,
&doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
fprintf(stream, "%.6f", doubleinfo);
break;
case VAR_CONNECT_TIME:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
fprintf(stream, "%.6f", doubleinfo);
break;
case VAR_APPCONNECT_TIME:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME,
&doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
fprintf(stream, "%.6f", doubleinfo);
break;
case VAR_PRETRANSFER_TIME:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME,
&doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
fprintf(stream, "%.6f", doubleinfo);
break;
case VAR_STARTTRANSFER_TIME:
if(CURLE_OK ==
curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME,
&doubleinfo))
fprintf(stream, "%.3f", doubleinfo);
fprintf(stream, "%.6f", doubleinfo);
break;
case VAR_SIZE_UPLOAD:
if(CURLE_OK ==