FScopedStatsCounter

Used to accumulate cycles to a [CallStats](API\Runtime\Core\ProfilingDebugging\FCookStats\CallStats) instance.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/ProfilingDebugging/CookStats.h

Include

#include "ProfilingDebugging/CookStats.h"

Syntax

class FScopedStatsCounter

Remarks

Used to accumulate cycles to a CallStats instance. Will also accumulate hit/miss stats in the dtor as well. If AddHit is not called, it will assume a miss. If AddMiss is called, it will convert the call to a miss.

Constructors

Name Description

Public function

FScopedStatsCounter

(
    CallStats& InStats
)

Starts the time, tracks the underlying stat it will update.

Destructors

Name Description

Public function

~FScopedStatsCounter()

Stop the timer and flushes the stats to the underlying stats object.

Functions

Name Description

Public function

void

 

AddHit

(
    int64 InBytesProcessed
)

Call to indicate a Get or Put "cache hit". Exists calls by definition don't have hits or misses.

Public function

void

 

AddHitOrMiss

(
    CallStats::EHitOrMiss InHitOrMiss,
    int64 InBytesProcessed
)

Call to indicate either a hit or miss. See AddHit and AddMiss.

Public function

void

 

AddMiss

(
    int64 InBytesProcessed
)

Call to indicate a Get or Put "cache miss".

Public function

void

 

Cancel()

Used to cancel a timing, if we had to start one without knowing in advance if we must record it.

Public function

void

 

TrackCyclesOnly()

Used to track cycles, but not as a new hit/miss.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss