StormByte-Network 4.0.0
C++26 networking module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Network::ServerTelemetry Class Referencefinal

Server-wide cumulative telemetry aggregated across all sessions. More...

#include <StormByte/network/server_telemetry.hxx>

Inheritance diagram for StormByte::Network::ServerTelemetry:
Collaboration diagram for StormByte::Network::ServerTelemetry:

Public Member Functions

 ServerTelemetry () noexcept
 Construct all server counters at zero.
 ~ServerTelemetry () noexcept override
 Virtual destructor anchors server telemetry RTTI in Network.
Size CurrentConnections () const noexcept
 Number of currently active application sessions.
Size AcceptedConnections () const noexcept
 Total application sessions accepted by this Server.
Size ClosedConnections () const noexcept
 Total application sessions closed by this Server.
Size PeakConnections () const noexcept
 Maximum simultaneous application sessions observed.
Size PacketsDispatched () const noexcept
 Valid application packets submitted to the worker pool.
Size HandlersCompleted () const noexcept
 Packet handlers that returned a non-null response.
Size HandlersWithoutResponse () const noexcept
 Packet handlers that returned no response.
Size HandlerErrors () const noexcept
 Worker-pool callbacks that completed with an error.
Size HandlerLatencySamples () const noexcept
 Number of completed packet-handler duration samples.
std::chrono::microseconds MeanHandlerLatency () const noexcept
 Mean ProcessClientPacket duration, or zero without samples.
Size WorkerQueueBackpressureEvents () const noexcept
 Times a ready session was blocked by a full worker queue.
 operator StormByte::Safe::String () const override
 Flatten the aggregate server counters to owned UTF-8 text.
Public Member Functions inherited from StormByte::Network::Telemetry
 ~Telemetry () noexcept override
 Virtual destructor anchors telemetry RTTI in Network.
Public Member Functions inherited from StormByte::Telemetry
virtual operator Safe::String () const=0
STORMBYTE_FORCE_INLINE operator std::string () const

Friends

class Server
 Allow the owning server to record telemetry events.

Additional Inherited Members

Protected Types inherited from StormByte::Network::Telemetry
using Sample = StormByte::Clock::Sample
 Base-owned independent RAII measurement token.
Protected Member Functions inherited from StormByte::Network::Telemetry
 Telemetry () noexcept
 Construct an empty Network telemetry base.
Sample Measure (std::string_view name) noexcept
 Start a named operation sample.
Protected Member Functions inherited from StormByte::Telemetry
 Telemetry () noexcept
 Telemetry (const Telemetry &)=delete
 Telemetry (Telemetry &&other) noexcept
Telemetry & operator= (const Telemetry &)=delete
Telemetry & operator= (Telemetry &&other) noexcept
class Clock & Clock (std::string_view name)
class Clock::Sample MeasureClock (std::string_view name) noexcept
const class Clock & Clock (std::string_view name) const

Detailed Description

Server-wide cumulative telemetry aggregated across all sessions.

Constructor & Destructor Documentation

◆ ServerTelemetry()

StormByte::Network::ServerTelemetry::ServerTelemetry ( )
noexcept

Construct all server counters at zero.

◆ ~ServerTelemetry()

StormByte::Network::ServerTelemetry::~ServerTelemetry ( )
overridenoexcept

Virtual destructor anchors server telemetry RTTI in Network.

Member Function Documentation

◆ AcceptedConnections()

Size StormByte::Network::ServerTelemetry::AcceptedConnections ( ) const
noexcept

Total application sessions accepted by this Server.

Returns
Cumulative accepted-session count.

◆ ClosedConnections()

Size StormByte::Network::ServerTelemetry::ClosedConnections ( ) const
noexcept

Total application sessions closed by this Server.

Returns
Cumulative closed-session count.

◆ CurrentConnections()

Size StormByte::Network::ServerTelemetry::CurrentConnections ( ) const
noexcept

Number of currently active application sessions.

Returns
Current active-session count.

◆ HandlerErrors()

Size StormByte::Network::ServerTelemetry::HandlerErrors ( ) const
noexcept

Worker-pool callbacks that completed with an error.

Returns
Cumulative worker-pool error count.

◆ HandlerLatencySamples()

Size StormByte::Network::ServerTelemetry::HandlerLatencySamples ( ) const
noexcept

Number of completed packet-handler duration samples.

Returns
Cumulative completed handler-duration sample count.

◆ HandlersCompleted()

Size StormByte::Network::ServerTelemetry::HandlersCompleted ( ) const
noexcept

Packet handlers that returned a non-null response.

Returns
Cumulative count of handlers returning responses.

◆ HandlersWithoutResponse()

Size StormByte::Network::ServerTelemetry::HandlersWithoutResponse ( ) const
noexcept

Packet handlers that returned no response.

Returns
Cumulative no-response count, including intentional disconnects.

◆ MeanHandlerLatency()

std::chrono::microseconds StormByte::Network::ServerTelemetry::MeanHandlerLatency ( ) const
noexcept

Mean ProcessClientPacket duration, or zero without samples.

Returns
Mean elapsed microseconds, truncated to whole microseconds; zero when no samples have been recorded.

◆ operator StormByte::Safe::String()

StormByte::Network::ServerTelemetry::operator StormByte::Safe::String ( ) const
overridevirtual

Flatten the aggregate server counters to owned UTF-8 text.

Returns
Owned text containing the server's telemetry counters.

Implements StormByte::Network::Telemetry.

◆ PacketsDispatched()

Size StormByte::Network::ServerTelemetry::PacketsDispatched ( ) const
noexcept

Valid application packets submitted to the worker pool.

Returns
Cumulative dispatched-packet count.

◆ PeakConnections()

Size StormByte::Network::ServerTelemetry::PeakConnections ( ) const
noexcept

Maximum simultaneous application sessions observed.

Returns
Highest recorded active-session count.

◆ WorkerQueueBackpressureEvents()

Size StormByte::Network::ServerTelemetry::WorkerQueueBackpressureEvents ( ) const
noexcept

Times a ready session was blocked by a full worker queue.

Returns
Cumulative worker-queue backpressure event count.

◆ Server

friend class Server
friend

Allow the owning server to record telemetry events.


The documentation for this class was generated from the following file: