You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
New Insights stats: - File I/O trace for storage server files (requires running with -trace=default,file) - Throughput counters, matching the on-screen display (requires -trace=default,counters) Debug refactor: - Main stat processing moved to ticker - Startup stats processed by background thread CVar changes: - On-screen graphs now toggled via zen.showgraphs - Added zen.showstats to toggle the on-screen throughput messages #jira UE-221612 #rnx #rb daniele.pieroni [CL 35562191 by david harvey in ue5-main branch]
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Engine/Canvas.h"
|
|
#include "HAL/CriticalSection.h"
|
|
#include <vector>
|
|
#include "IStorageServerPlatformFile.h"
|
|
|
|
#if !UE_BUILD_SHIPPING
|
|
class FStorageServerConnectionDebug
|
|
{
|
|
public:
|
|
FStorageServerConnectionDebug( IStorageServerPlatformFile* InStorageServerPlatformFile )
|
|
: StorageServerPlatformFile(InStorageServerPlatformFile)
|
|
, HostAddress(InStorageServerPlatformFile->GetHostAddr())
|
|
{
|
|
}
|
|
|
|
bool OnTick(float); // FTickerDelegate
|
|
void OnDraw(UCanvas*, APlayerController*); // FDebugDrawDelegate
|
|
|
|
private:
|
|
double MaxReqThroughput = 0.0;
|
|
double MinReqThroughput = 0.0;
|
|
uint32 ReqCount = 0;
|
|
double Throughput = 0.0;
|
|
|
|
struct HistoryItem
|
|
{
|
|
double Time;
|
|
double MaxRequestThroughput;
|
|
double MinRequestThroughput;
|
|
double Throughput;
|
|
uint32 RequestCount;
|
|
};
|
|
|
|
std::vector<HistoryItem> History = {{0, 0, 0, 0, 0}};
|
|
|
|
static constexpr float UpdateStatsTimer = 1.0;
|
|
double UpdateStatsTime = 0.0;
|
|
|
|
IStorageServerPlatformFile* StorageServerPlatformFile = nullptr;
|
|
FString HostAddress;
|
|
|
|
FCriticalSection CS;
|
|
};
|
|
#endif // !UE_BUILD_SHIPPING
|