Navigation
API > API/Runtime > API/Runtime/Engine
A metrics listener that reports an array of metrics to CSV.
The function SetCategory() is expected to be called before the listener is registered with FNetworkMetricsDatabase::Register(). This function will associate the instance of UNetworkMetricsCSV with a category of values in CSV.
To use UNetworkMetricsCSV in a configuration file, a sub-class of UNetworkMetricsCSV must be created that calls SetCategory() from the constructor to provide the CSV category to use.
UCLASS() class UNetworkMetricsCSV_ExampleCategory : public UNetworkMetricsCSV {
public: virtual ~UNetworkMetricsCSV_ExampleCategory() = default;
UNetworkMetricsCSV_ExampleCategory() : UNetworkMetricsCSV() { SetCategory("ExampleCategory"); } };
This sub-class can then be used in the configuration file when registering a listener:
[/Script/Engine.NetworkMetricsConfig] +Listeners=(MetricName=ExampleMetric, ClassName=/Script/Engine.NetworkMetricsCSV_ExampleCategory)
If the base UNetworkMetricsCSV class is used in the configuration file, CSV stats will be recorded to the default 'Networking' category.
| Name | UNetworkMetricsCSV |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/Net/NetworkMetricsDatabase.h |
| Include Path | #include "Net/NetworkMetricsDatabase.h" |
Syntax
UCLASS (MinimalAPI)
class UNetworkMetricsCSV : public UNetworkMetricsBaseListener
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UNetworkMetricsBaseListener → UNetworkMetricsCSV
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UNetworkMetricsCSV() |
Net/NetworkMetricsDatabase.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~UNetworkMetricsCSV() |
Net/NetworkMetricsDatabase.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CategoryIndex | int32 | Net/NetworkMetricsDatabase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void SetCategory
(
const FString& CategoryName |
Set the CSV category. | Net/NetworkMetricsDatabase.h |
Overridden from UNetworkMetricsBaseListener
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Report
(
const UE::Net::FNetworkMetricSnapshot& Snapshot |
Net/NetworkMetricsDatabase.h |