Files
UnrealEngineUWP/Engine/Source/Developer/TraceAnalysis/Private/Analysis/Processor.h
Johan Berg 84495298d7 [Insights] Surface error messages from analysis engine to the user
We have previously relied on UE_LOG messages to indicate problems in analysis. This change converts those log messages to use MessageLog functionality which is routed to a visual log representation inside the application (but also the log file).

Additionally adds functionality to show the Insights log windows when ever (new) errors are encountered.

#rb ionut.matasaru
#jira UE-154022
#preflight 63c91aa80225f00e14758d19

[CL 23771338 by Johan Berg in ue5-main branch]
2023-01-19 05:33:25 -05:00

42 lines
909 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Engine.h"
#include "HAL/Runnable.h"
#include "Logging/MessageLog.h"
#include "Trace/Analysis.h"
class FEvent;
class FRunnableThread;
namespace UE {
namespace Trace {
////////////////////////////////////////////////////////////////////////////////
class FAnalysisProcessor::FImpl
: public FRunnable
{
public:
FImpl(IInDataStream& DataStream, TArray<IAnalyzer*>&& InAnalyzers);
~FImpl();
virtual uint32 Run() override;
bool IsActive() const;
void StopAnalysis();
void WaitOnAnalysis();
void PauseAnalysis(bool bState);
FMessageLog* GetLog();
private:
FMessageLog Log;
FAnalysisEngine AnalysisEngine;
IInDataStream& DataStream;
FEvent* StopEvent;
FEvent* UnpausedEvent;
FRunnableThread* Thread = nullptr;
volatile bool bComplete = false;
};
} // namespace Trace
} // namespace UE