Add Streaming.Stats for resources streaming statistics

This commit is contained in:
Wojtek Figat
2021-07-07 10:14:39 +02:00
parent 7985196155
commit 3cfdf8871f
2 changed files with 29 additions and 0 deletions

View File

@@ -251,6 +251,20 @@ void StreamingSystem::Execute(TaskGraph* graph)
graph->DispatchJob(job, 1);
}
StreamingStats Streaming::GetStats()
{
StreamingStats stats;
ResourcesLock.Lock();
stats.ResourcesCount = Resources.Count();
for (auto e : Resources)
{
if (e->Streaming.TargetResidency > e->GetCurrentResidency())
stats.StreamingResourcesCount++;
}
ResourcesLock.Unlock();
return stats;
}
void Streaming::RequestStreamingUpdate()
{
PROFILE_CPU();