FPersistentStatsBase

Both ContentRequests and Individual Bundles use this to track data respective to themselves.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

InstallBundleManager

Header

/Engine/Source/Runtime/InstallBundleManager/Public/InstallBundleUtils.h

Include

#include "InstallBundleUtils.h"

Syntax

class FPersistentStatsBase : public FJsonSerializable

Remarks

Both ContentRequests and Individual Bundles use this to track data respective to themselves. Keeps us from having to write serialization / loading data for both cases that would be the same

Variables

Name Description

Protected variable

FString

 

AnalyticsSessionID

Protected variable

bool

 

bHasLoadedFromDisk

Protected variable

bool

 

bIsActive

We don't serialize these as they are tracking behavior and not stats.

Protected variable

bool

 

bIsDirty

Protected variable

TMap< FString, ...

 

CountStatMap

Protected variable

TMap< FString, ...

 

TimingStatsMap

Serialized Stat Data.

Constructors

Name Description

Protected function

FPersistentStatsBase()

Protected so we can only construct the derived versions of this Base class.

Destructors

Name Description

Public function Virtual

~FPersistentStatsBase()

Functions

Name Description

Public function Static

const FStrin...

 

GetBaseExpectedAnalyticsID()

Static Methods.

Public function Const

const int &#...

 

GetCountStatData

(
    ECountStatNames StatToGet
)

Public function Const

const FStrin...

 

GetFullPathForStatFile()

Pure Virtual Methods.

Public function Const

const FPersi...

 

GetTimingStatData

(
    ETimingStatNames StatToGet
)

Protected function

void

 

HandleTimerStatsAfterDataLoad()

Helper to try and reconcile offline and active timers after we load data from disk.

Public function Const

bool

 

HasCountStat

(
    ECountStatNames StatToCheck
)

Public function Const

bool

 

HasTimingStat

(
    ETimingStatNames StatToCheck
)

Public function

void

 

IncrementCountStat

Public function Const

bool

 

IsActive()

Public function Const

bool

 

IsDirty()

Public function Const

bool

 

IsTimingStatStarted

(
    ETimingStatNames StatToUpdate
)

Public function

bool

 

LoadStatsFromDisk()

Function that allows you to load stats from disk. Returns true if stats were either loaded from disk now, or previously were loaded from disk.

Protected function

void

 

OnLoadingDataFromDisk()

The disk, and its possible to skip pulling data from the disk!

Protected function

void

 

ResetStats

(
    const FString& NewAnalyticsSession...
)

Public function

bool

 

SaveStatsToDisk()

Saves the persistent stat data to disk in the location returned by GetFullPathForStatFile() Returns True if that save succeeds and false otherwise.

Public function

void

 

StartTimingStat

(
    ETimingStatNames StatToUpdate
)

Public function

void

 

StatsBegin

(
    const FString& ExpectedAnalyticsID,
    bool bForceResetData
)

Tries to load persistent stats from disk and determine if we need to resume our previous persistent session or start a new one.

Public function

void

 

StatsEnd

(
    bool bStopAllActiveTimers
)

Tries to set this stat pool as "inactive". By default also stop all active timers.

Public function

void

 

StopAllActiveTimers()

Public function

void

 

StopTimingStat

(
    ETimingStatNames StatToUpdate,
    bool UpdateTimerOnStop
)

Public function

void

 

UpdateAllActiveTimers()

Public function

void

 

UpdateTimingStat

(
    ETimingStatNames StatToUpdate
)

Overridden from FJsonSerializable

Name Description

Public function Virtual

void

 

Serialize

(
    FJsonSerializerBase& Serializer,
    bool bFlatObject
)

We should not ever really be serializing this base class. Kept it here for reference.