Open 3D Engine Multiplayer Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Multiplayer::IMultiplayerStatSystem Class Referenceabstract

#include <MultiplayerStatSystemInterface.h>

Inherited by Multiplayer::MultiplayerStatSystemComponent.

Public Member Functions

 AZ_RTTI (IMultiplayerStatSystem, "{B7689E92-9D5F-469D-97FA-5709BCD94DED}")
 
virtual void Register ()=0
 Initialize the system.
 
virtual void Unregister ()=0
 De-initialize the system.
 
virtual void SetReportPeriod (AZ::TimeMs period)=0
 
virtual void DeclareStatGroup (int uniqueGroupId, const char *groupName)=0
 
virtual void DeclareStat (int uniqueGroupId, int uniqueStatId, const char *statName)=0
 
virtual void SetStat (int uniqueStatId, double value)=0
 
virtual void IncrementStat (int uniqueStatId)=0
 

Detailed Description

Provides a high level stat system for Multiplayer gem and projects.

Member Function Documentation

◆ DeclareStat()

virtual void Multiplayer::IMultiplayerStatSystem::DeclareStat ( int  uniqueGroupId,
int  uniqueStatId,
const char *  statName 
)
pure virtual

Declares a stat belonging to an existing group.

Parameters
uniqueGroupIda group id already declared with DECLARE_PERFORMANCE_STAT_GROUP
uniqueStatIda stat id already declared with DECLARE_PERFORMANCE_STAT
statNamename of the stat, this does NOT take the ownership of the string

Implemented in Multiplayer::MultiplayerStatSystemComponent.

◆ DeclareStatGroup()

virtual void Multiplayer::IMultiplayerStatSystem::DeclareStatGroup ( int  uniqueGroupId,
const char *  groupName 
)
pure virtual

Declares a stat group with a name using a unique id. It's recommended to use DECLARE_PERFORMANCE_STAT_GROUP macro instead.

Parameters
uniqueGroupIda unique id for a group of stats
groupNamea name for the group

Implemented in Multiplayer::MultiplayerStatSystemComponent.

◆ IncrementStat()

virtual void Multiplayer::IMultiplayerStatSystem::IncrementStat ( int  uniqueStatId)
pure virtual

It's recommended to use INCREASE_PERFORMANCE_STAT macro instead. Increments the value of a given stat by one (1) that has been already declared with DECLARE_PERFORMANCE_STAT Note: metrics will take the average value of a stat within the period configured with @SetReportPeriod and reset to back to zero each time.

Parameters
uniqueStatIda unique stat id

Implemented in Multiplayer::MultiplayerStatSystemComponent.

◆ SetReportPeriod()

virtual void Multiplayer::IMultiplayerStatSystem::SetReportPeriod ( AZ::TimeMs  period)
pure virtual

Change how often metrics are written to AZ::EventLogger.

Parameters
periodtime in milliseconds between recording events

Implemented in Multiplayer::MultiplayerStatSystemComponent.

◆ SetStat()

virtual void Multiplayer::IMultiplayerStatSystem::SetStat ( int  uniqueStatId,
double  value 
)
pure virtual

It's recommended to use SET_PERFORMANCE_STAT macro instead. Updates the value of a given stat already declared with DECLARE_PERFORMANCE_STAT Note: metrics will take the average value of a stat within the period configured with @SetReportPeriod

Parameters
uniqueStatIda unique stat id
valuecurrent value

Implemented in Multiplayer::MultiplayerStatSystemComponent.


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