45#include <StormByte/safe/atomic.hxx>
46#include <StormByte/size.hxx>
168 void RecordConnectionAccepted() noexcept;
175 void RecordConnectionClosed() noexcept;
180 void RecordPacketDispatched() noexcept;
190 void RecordHandlerResult(
std::chrono::microseconds elapsed,
bool succeeded) noexcept;
195 void RecordHandlerError() noexcept;
207 void RecordWorkerQueueBackpressure() noexcept;
209 Safe::Atomic<
std::uint64_t> m_current_connections{0};
212 Safe::Atomic<std::uint64_t> m_peak_connections{0};
213 Safe::Atomic<std::uint64_t> m_packets_dispatched{0};
214 Safe::Atomic<std::uint64_t> m_handlers_completed{0};
215 Safe::Atomic<std::uint64_t> m_handlers_without_response{0};
216 Safe::Atomic<std::uint64_t> m_handler_errors{0};
217 Safe::Atomic<std::uint64_t> m_latency_samples{0};
218 Safe::Atomic<std::uint64_t> m_latency_us{0};
219 Safe::Atomic<std::uint64_t> m_queue_backpressure_events{0};
STORMBYTE_DECLARE_MAYBE_SAFE(StormByte::Buffer::Bridge)
Server-wide cumulative telemetry aggregated across all sessions.
Definition server_telemetry.hxx:71
Size CurrentConnections() const noexcept
Number of currently active application sessions.
Size HandlersWithoutResponse() const noexcept
Packet handlers that returned no response.
Size AcceptedConnections() const noexcept
Total application sessions accepted by this Server.
operator StormByte::Safe::String() const override
Flatten the aggregate server counters to owned UTF-8 text.
Size HandlerLatencySamples() const noexcept
Number of completed packet-handler duration samples.
Size WorkerQueueBackpressureEvents() const noexcept
Times a ready session was blocked by a full worker queue.
std::chrono::microseconds MeanHandlerLatency() const noexcept
Mean ProcessClientPacket duration, or zero without samples.
Size HandlerErrors() const noexcept
Worker-pool callbacks that completed with an error.
Size HandlersCompleted() const noexcept
Packet handlers that returned a non-null response.
Size PacketsDispatched() const noexcept
Valid application packets submitted to the worker pool.
ServerTelemetry() noexcept
Construct all server counters at zero.
Size ClosedConnections() const noexcept
Total application sessions closed by this Server.
friend class Server
Allow the owning server to record telemetry events.
Definition server_telemetry.hxx:161
Size PeakConnections() const noexcept
Maximum simultaneous application sessions observed.
Abstract application server.
Definition server.hxx:148
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