nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::BotMetrics Class Reference

#include <bot_metrics.h>

Public Member Functions

 BotMetrics (const std::string &transport)
void ObserveAge (std::chrono::microseconds age)
void SetConnected (int bots)
void ObserveLogin (const char *result, std::chrono::nanoseconds time)
const std::shared_ptr< prometheus::Registry > & registry () const

Detailed Description

Definition at line 15 of file bot_metrics.h.

Constructor & Destructor Documentation

◆ BotMetrics()

nanommo::BotMetrics::BotMetrics ( const std::string & transport)
explicit

Definition at line 16 of file bot_metrics.cc.

Member Function Documentation

◆ ObserveAge()

void nanommo::BotMetrics::ObserveAge ( std::chrono::microseconds age)

Definition at line 43 of file bot_metrics.cc.

◆ ObserveLogin()

void nanommo::BotMetrics::ObserveLogin ( const char * result,
std::chrono::nanoseconds time )

A bot's login, from its first request to the login server to its token to enter the world, by what came of it: ok, refused, timeout when the login server didn't answer within LogIn's deadline, or failed. It's what players see, which the login server's own metrics can't, as a request that never reaches it, or never ends, is never counted there.

Definition at line 49 of file bot_metrics.cc.

◆ registry()

const std::shared_ptr< prometheus::Registry > & nanommo::BotMetrics::registry ( ) const
inline

Definition at line 30 of file bot_metrics.h.

◆ SetConnected()

void nanommo::BotMetrics::SetConnected ( int bots)

Definition at line 47 of file bot_metrics.cc.


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