45#include <StormByte/safe/atomic.hxx>
46#include <StormByte/size.hxx>
153 void RecordConnectionAttempt() noexcept;
158 void RecordConnectionEstablished() noexcept;
163 void RecordConnectionFailed() noexcept;
168 void RecordDisconnected() noexcept;
173 void RecordRequest() noexcept;
182 void RecordRequestResult(
std::chrono::microseconds elapsed,
bool responded) noexcept;
190 Safe::Atomic<
std::uint64_t> m_connection_attempts{0};
193 Safe::Atomic<bool> m_connected{
false};
194 Safe::Atomic<std::uint64_t> m_requests{0};
195 Safe::Atomic<std::uint64_t> m_responses{0};
196 Safe::Atomic<std::uint64_t> m_requests_without_response{0};
197 Safe::Atomic<std::uint64_t> m_latency_samples{0};
198 Safe::Atomic<std::uint64_t> m_latency_us{0};
STORMBYTE_DECLARE_MAYBE_SAFE(StormByte::Buffer::Bridge)
Cumulative telemetry owned by one Client instance.
Definition client_telemetry.hxx:71
Size RequestsWithoutResponse() const noexcept
Requests for which Send returned no decoded response.
Size ConnectionFailures() const noexcept
Failed connection attempts made by this Client.
operator StormByte::Safe::String() const override
Flatten this client's counters to owned UTF-8 text.
ClientTelemetry() noexcept
Construct all client counters at zero.
friend class Client
Allow the owning client to record telemetry events.
Definition client_telemetry.hxx:148
Size Requests() const noexcept
Requests initiated through Client::Send.
Size ConnectionsEstablished() const noexcept
Successful connections made by this Client.
std::chrono::microseconds MeanRequestLatency() const noexcept
Mean complete Send round-trip, or zero without samples.
bool Connected() const noexcept
Whether this Client currently has an application connection.
Size ConnectionAttempts() const noexcept
Number of calls to Client::Connect.
Size Responses() const noexcept
Requests that returned a decoded response packet.
Size RequestLatencySamples() const noexcept
Number of completed request-latency samples.
Abstract application client.
Definition client.hxx:124
Telemetry() noexcept
Construct an empty Network telemetry base.
StormByte::Clock::Sample Sample
Base-owned independent RAII measurement token.
Definition telemetry.hxx:91
Network module of the StormByte suite.
Root namespace of the StormByte suite.
#define STORMBYTE_NETWORK_PUBLIC
Definition visibility.h:51