FPersistentStatContainerBase

Helper class to handle holding a collection of Bundle and Session stats.

Choose your operating system:

Windows

macOS

Linux

References

Module

InstallBundleManager

Header

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

Include

#include "InstallBundleUtils.h"

Syntax

class FPersistentStatContainerBase

Remarks

Helper class to handle holding a collection of Bundle and Session stats.

Variables

Name Description

Protected variable

bool

 

bShouldAutoHandleFGBGStats

Determines if we should automatically Start,Stop,and Update the FG and BG versions of our timer stats.

Protected variable

bool

 

bShouldAutoUpdateTimersInTick

These settings determine if we auto-update our Timer stats on a tick.

Protected variable

bool

 

bShouldSaveDirtyStatsOnTick

These settings determine how we handle saving our stats to disk.

Protected variable

float

 

DirtyStatSaveToDiskRate

Protected variable

FDelegateHandle

 

OnApp_EnteringBackgroundHandle

Protected variable

FDelegateHandle

 

OnApp_EnteringForegroundHandle

Protected variable

TMap< FName, FB...

 

PerBundlePersistentStatMap

Protected variable

TMap< FString, ...

 

SessionPersistentStatMap

Protected variable

FTSTicker::FDel...

 

TickHandle

Protected variable

float

 

TimerAutoUpdateRate

Protected variable

float

 

TimerAutoUpdateTimeRemaining

Internal counter used to track when we need to run our timer update during tick.

Protected variable

float

 

TimerDirtyStatUpdateTimeRemaining

Internal counter used to track when we need to update all of our dirty stats.

Constructors

Destructors

Functions

Name Description

Public function Virtual Const

const FBundl...

 

GetBundleStat

(
    FName BundleName
)

Public function Virtual Const

const FSessi...

 

GetSessionStat

(
    const FString& SessionName
)

Public function Virtual

void

 

IncrementBundlePersistentCounter

(
    FName BundleName,
    ECountStatNames CounterToUpdate
)

Public function Virtual

void

 

IncrementSessionPersistentCounter

(
    const FString& SessionName,
    ECountStatNames CounterToUpdate
)

Public function

void

 

InitializeBase()

NOTE! These 2 functions are not virtual as we call them in the construct/deconstructor!

Protected function Virtual

void

 

LoadRequiredBundleDataFromDiskForSession

(
    const FString& SessionName
)

Ensures that the previous run data exists for this given session!

Protected function Virtual

void

 

OnApp_EnteringBackground()

Protected function Virtual

void

 

OnApp_EnteringForeground()

Protected function Virtual

void

 

OnBackground_HandleBundleStats()

Protected function Virtual

void

 

OnBackground_HandleSessionStats()

Protected function Virtual

void

 

OnForeground_HandleBundleStats()

Protected function Virtual

void

 

OnForeground_HandleSessionStats()

Protected function Virtual

void

 

OnTimerStartedForStat

(
    FPersistentStatsBase& BundleStatFo...,
    ETimingStatNames TimerStarted
)

Called whenever we start a timer.

Protected function Virtual

void

 

OnTimerStoppedForStat

(
    FPersistentStatsBase& BundleStatFo...,
    ETimingStatNames TimerStarted
)

Called whenever we stop a timer.

Public function Virtual

void

 

RemoveBundleStats

(
    FName BundleName
)

Public function Virtual

void

 

RemoveSessionStats

(
    const FString& SessionName
)

Deletes persistent stat information from our stats for this Session/Bundle to reduce memory useage.

Protected function Virtual

void

 

ResetDirtyStatUpdate()

Protected function Virtual

void

 

ResetTimerUpdate()

Public function Virtual

void

 

SaveAllDirtyStatsToDisk()

Public function

void

 

ShutdownBase()

Public function Virtual

void

 

StartBundlePersistentStatTimer

(
    FName BundleName,
    ETimingStatNames TimerToStart
)

Public function Virtual

void

 

StartBundlePersistentStatTracking

(
    FName BundleName,
    const FString& ExpectedAnalyticsID,
    bool bForceResetStatData
)

Starts Bundle Persistent Stat Tracking for the given BundleName.

Public function Virtual

void

 

StartSessionPersistentStatTimer

(
    const FString& SessionName,
    ETimingStatNames TimerToStart
)

Public function Virtual

void

 

StartSessionPersistentStatTracking

(
    const FString& SessionName,
    const TArray< FName >& RequiredBun...,
    const FString& ExpectedAnalyticsID,
    bool bForceResetStatData
)

Starts Session Persistent Stat Tracking under the given SessionName.

Public function Virtual

void

 

StopBundlePersistentStatTimer

(
    FName BundleName,
    ETimingStatNames TimerToStop
)

Public function Virtual

void

 

StopBundlePersistentStatTracking

(
    FName BundleName,
    bool bStopAllActiveTimers
)

Public function Virtual

void

 

StopSessionPersistentStatTimer

(
    const FString& SessionName,
    ETimingStatNames TimerToStop
)

Public function Virtual

void

 

StopSessionPersistentStatTracking

(
    const FString& SessionName,
    bool bStopAllActiveTimers
)

Protected function Virtual

bool

 

Tick

(
    float dt
)

Protected function Virtual

void

 

UpdateAllBundlesActiveTimers()

Protected function Virtual

void

 

UpdateAllSessionActiveTimers()

Public function Virtual

void

 

UpdateBundlePersistentStatTimer

(
    FName BundleName,
    ETimingStatNames TimerToUpdate
)

Public function Virtual

void

 

UpdateSessionPersistentStatTimer

(
    const FString& SessionName,
    ETimingStatNames TimerToUpdate
)

Protected function Virtual

void

 

UpdateStatsForBackground

(
    FPersistentStatsBase& StatToUpdate
)

Stops active foreground timers when going to background and starts applicable background version Also increments background counters

Protected function Virtual

void

 

UpdateStatsForForeground

(
    FPersistentStatsBase& StatToUpdate
)

Stops active background timers and resumes applicable foreground timers Also increments foreground counters