nghttp: Show '*' to mark pushed resources in --stat output
This commit is contained in:
parent
685dabc2d6
commit
f87aaf1fbf
|
@ -1894,9 +1894,11 @@ void print_stats(const HttpClient &client) {
|
||||||
Request timing:
|
Request timing:
|
||||||
complete: relative time from protocol handshake to stream close
|
complete: relative time from protocol handshake to stream close
|
||||||
request: relative time from protocol handshake to request
|
request: relative time from protocol handshake to request
|
||||||
transmission
|
transmission. If '*' is shown, this was pushed by server.
|
||||||
process: time for request and response
|
process: time for request and response
|
||||||
code: HTTP status code
|
code: HTTP status code
|
||||||
|
size: number of bytes received as response body without
|
||||||
|
inflation.
|
||||||
URI: request URI
|
URI: request URI
|
||||||
|
|
||||||
sorted by 'complete'
|
sorted by 'complete'
|
||||||
|
@ -1912,9 +1914,10 @@ complete request process code size request path)" << std::endl;
|
||||||
req->timing.on_request_time - base);
|
req->timing.on_request_time - base);
|
||||||
auto total = std::chrono::duration_cast<std::chrono::microseconds>(
|
auto total = std::chrono::duration_cast<std::chrono::microseconds>(
|
||||||
req->timing.on_complete_time - req->timing.on_request_time);
|
req->timing.on_complete_time - req->timing.on_request_time);
|
||||||
|
auto pushed = req->stream_id % 2 == 0;
|
||||||
|
|
||||||
std::cout << std::setw(9) << ("+" + util::format_duration(completed_delta))
|
std::cout << std::setw(9) << ("+" + util::format_duration(completed_delta))
|
||||||
<< " " << std::setw(9)
|
<< " " << (pushed ? "*" : " ") << std::setw(9)
|
||||||
<< ("+" + util::format_duration(request_delta)) << " "
|
<< ("+" + util::format_duration(request_delta)) << " "
|
||||||
<< std::setw(8) << util::format_duration(total) << " "
|
<< std::setw(8) << util::format_duration(total) << " "
|
||||||
<< std::setw(4) << req->status << " " << std::setw(4)
|
<< std::setw(4) << req->status << " " << std::setw(4)
|
||||||
|
|
Loading…
Reference in New Issue