userver: userver/clients/http/local_stats.hpp Source File
Loading...
Searching...
No Matches
local_stats.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/clients/http/local_stats.hpp
4/// @brief @copybrief clients::http::LocalStats
5
6#include <chrono>
7#include <cstddef>
8
9USERVER_NAMESPACE_BEGIN
10
11namespace clients::http {
12
13/// @brief Local HTTP client timings and connection statistics
14struct LocalStats final {
15 using duration = std::chrono::steady_clock::time_point::duration;
16
17 duration time_to_connect{};
18
19 /// total time
20 duration time_to_process{};
21
22 size_t open_socket_count = 0;
23
24 /// returns 0 based retires count. In other words:
25 /// 0 - the very first request succeeded
26 /// 1 - made 1 retry
27 /// 2 - made 2 retries
28 /// ...
29 ///
30 size_t retries_count = 0;
31};
32
33} // namespace clients::http
34
35USERVER_NAMESPACE_END