You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Telemetry data is stored in a csv file that can be picked up later. Configuration options can be used to specify a custom path and force the csv file to be reset on new (editor) session. Telemetry data stores: platform, config, datetime, testname, context, datapoint, measurement #jira UEENGQA-38047 #rb Andrew.Grant [CL 15667990 by Jerome Delattre in ue5-main branch]
85 lines
1.7 KiB
C++
85 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Containers/Array.h"
|
|
#include "Containers/UnrealString.h"
|
|
#include "AutomationWorkerMessages.h"
|
|
|
|
|
|
class FAutomationTelemetry
|
|
: FNoncopyable
|
|
{
|
|
public:
|
|
|
|
/** Called to initialize the singleton. */
|
|
static void Initialize();
|
|
|
|
/** Helper to check if the Analytics provider is Initialized */
|
|
static bool IsInitialized();
|
|
|
|
public:
|
|
|
|
/** Handle adding telemetry data to output */
|
|
static void HandleAddTelemetry(const FAutomationWorkerTelemetryData& Data);
|
|
|
|
private:
|
|
|
|
static bool bIsInitialized;
|
|
static FString TelemetryDirectory;
|
|
static bool bResetTelemetryStorageOnNewSession;
|
|
|
|
enum Columns : uint8
|
|
{
|
|
Configuration,
|
|
Platform,
|
|
DateTime,
|
|
TestName,
|
|
Context,
|
|
DataPoint,
|
|
Measurement,
|
|
|
|
Count // number of columns
|
|
};
|
|
|
|
static FString ToColumnName(uint8 Index)
|
|
{
|
|
switch (Index)
|
|
{
|
|
case Columns::Configuration:
|
|
return TEXT("Configuration");
|
|
|
|
case Columns::Platform:
|
|
return TEXT("Platform");
|
|
|
|
case Columns::DateTime:
|
|
return TEXT("DateTime");
|
|
|
|
case Columns::TestName:
|
|
return TEXT("TestName");
|
|
|
|
case Columns::Context:
|
|
return TEXT("Context");
|
|
|
|
case Columns::DataPoint:
|
|
return TEXT("DataPoint");
|
|
|
|
case Columns::Measurement:
|
|
return TEXT("Measurement");
|
|
|
|
default:
|
|
return TEXT("Unknown");
|
|
}
|
|
}
|
|
|
|
static FString ToColumnValue(uint8 Index, const FAutomationWorkerTelemetryData& Data, const FAutomationWorkerTelemetryItem& Item);
|
|
|
|
/** Initiate telemetry storage csv file */
|
|
static bool InitiateStorage(const FString& StorageName);
|
|
|
|
/** Get telemetry storage file path using automation settings */
|
|
static FString GetStorageFilePath(const FString& StorageName);
|
|
|
|
};
|