Navigation
API > API/Runtime > API/Runtime/Engine
Metrics mutator that reports a 0-100 percentage using two source metrics.
| Name | FNetworkMetricsMutatorPercent |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Net/NetworkMetricsMutators.h |
| Include Path | #include "Net/NetworkMetricsMutators.h" |
Syntax
USTRUCT ()
struct FNetworkMetricsMutatorPercent : public FNetworkMetricsMutator
Inheritance Hierarchy
- FNetworkMetricsMutator → FNetworkMetricsMutatorPercent
Derived Classes
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Denominator | FValueVariant | Net/NetworkMetricsMutators.h | ||
| DenominatorName | FName | Net/NetworkMetricsMutators.h |
|
|
| MutatorName | FName | Auto-generated mutator name, derived from source metrics. | Net/NetworkMetricsMutators.h | |
| Numerator | FValueVariant | Net/NetworkMetricsMutators.h | ||
| NumeratorName | FName | Net/NetworkMetricsMutators.h |
|
|
| SourceMetricNames | TArray< FName, TInlineAllocator< 2 > > | Source metric names stored in an array so we can return a view to it from GetAllMetricNames. | Net/NetworkMetricsMutators.h |
Functions
Public
Overridden from FNetworkMetricsMutator
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TArrayView< const FName > GetAllMetricNames() |
Returns a list of all metrics used by this mutator. | Net/NetworkMetricsMutators.h | |
virtual FValueVariant GetValue() |
Returns the packet loss percentage as a float from 0-100. | Net/NetworkMetricsMutators.h | |
virtual void ProcessFrame
(
const UE::Net::FNetworkMetricSnapshot& Snapshot |
Called every frame with a snapshot containing this mutator's metrics. | Net/NetworkMetricsMutators.h | |
virtual void Reset() |
Clears internal data, typically used after a listener reports its metrics. | Net/NetworkMetricsMutators.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void SetDenominatorMetricName
(
FName MetricName |
Net/NetworkMetricsMutators.h | ||
void SetNumeratorMetricName
(
FName MetricName |
Net/NetworkMetricsMutators.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void UpdateFromSnapshotValue
(
FNetworkMetricsMutator::FValueVariant& InOutValue, |
Private template so it can be defined in the .cpp file. | Net/NetworkMetricsMutators.h |