#include <MultiplayerStatSystemComponent.h>
Inherits AZ::Component, and Multiplayer::IMultiplayerStatSystem.
|
| AZ_COMPONENT (MultiplayerStatSystemComponent, "{890831db-3ca4-4d8c-a43e-d53d1197044d}") |
|
|
void | Activate () override |
|
void | Deactivate () override |
|
|
void | Register () override |
|
void | Unregister () override |
| De-initialize the system.
|
|
void | SetReportPeriod (AZ::TimeMs period) override |
|
void | DeclareStatGroup (int uniqueGroupId, const char *groupName) override |
|
void | DeclareStat (int uniqueGroupId, int uniqueStatId, const char *statName) override |
|
void | SetStat (int uniqueStatId, double value) override |
|
void | IncrementStat (int uniqueStatId) override |
|
| 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 |
|
|
static void | Reflect (AZ::ReflectContext *context) |
|
static void | GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided) |
|
static void | GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible) |
|
Periodically writes the metrics to AZ::EventLogger. See MultiplayerStatSystem.h for documentation.
◆ Activate()
void Multiplayer::MultiplayerStatSystemComponent::Activate |
( |
| ) |
|
|
override |
◆ DeclareStat()
void Multiplayer::MultiplayerStatSystemComponent::DeclareStat |
( |
int |
uniqueGroupId, |
|
|
int |
uniqueStatId, |
|
|
const char * |
statName |
|
) |
| |
|
overridevirtual |
Declares a stat belonging to an existing group.
- Parameters
-
uniqueGroupId | a group id already declared with DECLARE_PERFORMANCE_STAT_GROUP |
uniqueStatId | a stat id already declared with DECLARE_PERFORMANCE_STAT |
statName | name of the stat, this does NOT take the ownership of the string |
Implements Multiplayer::IMultiplayerStatSystem.
◆ DeclareStatGroup()
void Multiplayer::MultiplayerStatSystemComponent::DeclareStatGroup |
( |
int |
uniqueGroupId, |
|
|
const char * |
groupName |
|
) |
| |
|
overridevirtual |
Declares a stat group with a name using a unique id. It's recommended to use DECLARE_PERFORMANCE_STAT_GROUP macro instead.
- Parameters
-
uniqueGroupId | a unique id for a group of stats |
groupName | a name for the group |
Implements Multiplayer::IMultiplayerStatSystem.
◆ IncrementStat()
void Multiplayer::MultiplayerStatSystemComponent::IncrementStat |
( |
int |
uniqueStatId | ) |
|
|
overridevirtual |
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
-
uniqueStatId | a unique stat id |
Implements Multiplayer::IMultiplayerStatSystem.
◆ Register()
void Multiplayer::MultiplayerStatSystemComponent::Register |
( |
| ) |
|
|
overridevirtual |
◆ SetReportPeriod()
void Multiplayer::MultiplayerStatSystemComponent::SetReportPeriod |
( |
AZ::TimeMs |
period | ) |
|
|
overridevirtual |
◆ SetStat()
void Multiplayer::MultiplayerStatSystemComponent::SetStat |
( |
int |
uniqueStatId, |
|
|
double |
value |
|
) |
| |
|
overridevirtual |
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
-
uniqueStatId | a unique stat id |
value | current value |
Implements Multiplayer::IMultiplayerStatSystem.
◆ Unregister()
void Multiplayer::MultiplayerStatSystemComponent::Unregister |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file:
- Gems/Multiplayer/Code/Source/MultiplayerStatSystemComponent.h