UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FShaderCompilerStats Struct Reference

#include <ShaderCompiler.h>

Classes

struct  FWorkerDiagnosticsInfo
 

Public Types

enum class  EExecutionType { Local , Distributed }
 
using ShaderCompilerStats = TMap< FString, FShaderStats >
 

Public Member Functions

void IncrementMaterialCook ()
 
void IncrementMaterialTranslated (double InTotalTime, double InTranslationOnlyTime, double InSerializeTime)
 
void IncrementMaterialCacheHit ()
 
ENGINE_API void RegisterCookedShaders (uint32 NumCooked, float CompileTime, EShaderPlatform Platform, const FString MaterialPath, FString PermutationString=FString(""))
 
ENGINE_API void RegisterCompiledShaders (uint32 NumPermutations, EShaderPlatform Platform, const FString MaterialPath, FString PermutationString=FString(""))
 
const TSparseArray< ShaderCompilerStats > & GetShaderCompilerStats ()
 
ENGINE_API void WriteStats (class FOutputDevice *Ar=nullptr)
 
ENGINE_API void WriteStatSummary ()
 
ENGINE_API uint32 GetTotalShadersCompiled ()
 
ENGINE_API void Aggregate (FShaderCompilerStats &Other)
 
ENGINE_API void WriteToCompactBinary (FCbWriter &Writer)
 
ENGINE_API void ReadFromCompactBinary (FCbObjectView &Reader)
 
ENGINE_API TSharedPtr< FJsonObjectToJson ()
 
void SetMultiProcessAggregated ()
 
void AddDDCMiss (uint32 NumMisses)
 
uint32 GetDDCMisses () const
 
void AddDDCHit (uint32 NumHits)
 
uint32 GetDDCHits () const
 
double GetTimeShaderCompilationWasActive ()
 
void RegisterLocalWorkerIdleTime (double IdleTime)
 
void RegisterNewPendingJob (FShaderCommonCompileJob &InOutJob)
 
void RegisterAssignedJob (FShaderCommonCompileJob &InOutJob)
 
void RegisterFinishedJob (FShaderCommonCompileJob &InOutJob)
 
void RegisterJobBatch (int32 NumJobs, EExecutionType ExecType)
 
void RegisterDistributedBuildStats (const FDistributedBuildStats &InStats)
 
void RegisterWorkerDiagnostics (const FShaderCompileWorkerDiagnostics &InDiagnostics, FString &&InBatchLabel, int32 InBatchSize, uint32 InWorkerId)
 
ENGINE_API void GatherAnalytics (const FString &BaseName, TArray< FAnalyticsEventAttribute > &Attributes)
 

Friends

class FShaderJobCache
 

Member Typedef Documentation

◆ ShaderCompilerStats

Member Enumeration Documentation

◆ EExecutionType

Enumerator
Local 
Distributed 

Member Function Documentation

◆ AddDDCHit()

void FShaderCompilerStats::AddDDCHit ( uint32  NumHits)

◆ AddDDCMiss()

void FShaderCompilerStats::AddDDCMiss ( uint32  NumMisses)

◆ Aggregate()

void FShaderCompilerStats::Aggregate ( FShaderCompilerStats Other)

◆ GatherAnalytics()

void FShaderCompilerStats::GatherAnalytics ( const FString &  BaseName,
TArray< FAnalyticsEventAttribute > &  Attributes 
)

◆ GetDDCHits()

uint32 FShaderCompilerStats::GetDDCHits ( ) const

◆ GetDDCMisses()

uint32 FShaderCompilerStats::GetDDCMisses ( ) const

◆ GetShaderCompilerStats()

const TSparseArray< ShaderCompilerStats > & FShaderCompilerStats::GetShaderCompilerStats ( )
inline

◆ GetTimeShaderCompilationWasActive()

double FShaderCompilerStats::GetTimeShaderCompilationWasActive ( )

◆ GetTotalShadersCompiled()

uint32 FShaderCompilerStats::GetTotalShadersCompiled ( )

◆ IncrementMaterialCacheHit()

void FShaderCompilerStats::IncrementMaterialCacheHit ( )

◆ IncrementMaterialCook()

void FShaderCompilerStats::IncrementMaterialCook ( )

◆ IncrementMaterialTranslated()

void FShaderCompilerStats::IncrementMaterialTranslated ( double  InTotalTime,
double  InTranslationOnlyTime,
double  InSerializeTime 
)

◆ ReadFromCompactBinary()

void FShaderCompilerStats::ReadFromCompactBinary ( FCbObjectView Reader)

◆ RegisterAssignedJob()

void FShaderCompilerStats::RegisterAssignedJob ( FShaderCommonCompileJob InOutJob)

Marks the job as given out to a worker for execution for the stats purpose. Job will be modified to include the current timestamp.

◆ RegisterCompiledShaders()

void FShaderCompilerStats::RegisterCompiledShaders ( uint32  NumPermutations,
EShaderPlatform  Platform,
const FString  MaterialPath,
FString  PermutationString = FString("") 
)

◆ RegisterCookedShaders()

void FShaderCompilerStats::RegisterCookedShaders ( uint32  NumCooked,
float  CompileTime,
EShaderPlatform  Platform,
const FString  MaterialPath,
FString  PermutationString = FString("") 
)

◆ RegisterDistributedBuildStats()

void FShaderCompilerStats::RegisterDistributedBuildStats ( const FDistributedBuildStats InStats)

Informs about current distributed build statistics.

◆ RegisterFinishedJob()

void FShaderCompilerStats::RegisterFinishedJob ( FShaderCommonCompileJob InOutJob)

Marks the job as finished for the stats purpose. Job will be modified to include the current timestamp.

◆ RegisterJobBatch()

void FShaderCompilerStats::RegisterJobBatch ( int32  NumJobs,
EExecutionType  ExecType 
)

Informs statistics about a new job batch, so we can tally up batches.

◆ RegisterLocalWorkerIdleTime()

void FShaderCompilerStats::RegisterLocalWorkerIdleTime ( double  IdleTime)

Informs statistics about a time a local ShaderCompileWorker spent idle.

◆ RegisterNewPendingJob()

void FShaderCompilerStats::RegisterNewPendingJob ( FShaderCommonCompileJob InOutJob)

Lets the stats to know about a newly added job. Job will be modified to include the current timestamp.

◆ RegisterWorkerDiagnostics()

void FShaderCompilerStats::RegisterWorkerDiagnostics ( const FShaderCompileWorkerDiagnostics InDiagnostics,
FString &&  InBatchLabel,
int32  InBatchSize,
uint32  InWorkerId 
)

Informs statistics about a new worker diagnostics for a finished job batch.

◆ SetMultiProcessAggregated()

void FShaderCompilerStats::SetMultiProcessAggregated ( )
inline

◆ ToJson()

TSharedPtr< FJsonObject > FShaderCompilerStats::ToJson ( )

◆ WriteStats()

void FShaderCompilerStats::WriteStats ( class FOutputDevice Ar = nullptr)

◆ WriteStatSummary()

void FShaderCompilerStats::WriteStatSummary ( )

◆ WriteToCompactBinary()

void FShaderCompilerStats::WriteToCompactBinary ( FCbWriter Writer)

Friends And Related Symbol Documentation

◆ FShaderJobCache

friend class FShaderJobCache
friend

The documentation for this struct was generated from the following files: