You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
60 lines
1.1 KiB
C++
60 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Engine/Canvas.h"
|
|
#include <vector>
|
|
|
|
#include "DebugStorageServerConnection.generated.h"
|
|
|
|
UCLASS()
|
|
class UDebugStorageServerConnection : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
void StartDrawing();
|
|
void StopDrawing();
|
|
|
|
void AddTimingInstance(double duration, uint64 bytes);
|
|
|
|
void SetHostAddress(FString Address)
|
|
{
|
|
HostAddress = Address;
|
|
}
|
|
|
|
static void ShowGraph(FOutputDevice&);
|
|
static void HideGraph(FOutputDevice&);
|
|
|
|
private:
|
|
void Draw(UCanvas* Canvas, class APlayerController* PC);
|
|
|
|
struct HistoryItem
|
|
{
|
|
double Time;
|
|
double MaxRequestThroughput;
|
|
double MinRequestThroughput;
|
|
double Throughput;
|
|
uint32 RequestCount;
|
|
};
|
|
|
|
std::vector<HistoryItem> History = {{0, 0, 0, 0, 0}};
|
|
|
|
FDelegateHandle DrawHandle;
|
|
|
|
static constexpr float UpdateStatsTimer = 1.0;
|
|
double UpdateStatsTime = 0.0;
|
|
uint64 AccumulatedBytes = 0;
|
|
uint32 RequestCount = 0;
|
|
|
|
double MinRequestThroughput = 0.0;
|
|
double MaxRequestThroughput = 0.0;
|
|
|
|
FCriticalSection StatsCS;
|
|
FString HostAddress;
|
|
|
|
static bool ShowGraphs;
|
|
|
|
};
|