2019-12-26 15:32:37 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-10-03 16:26:48 -04:00
|
|
|
|
|
|
|
|
#include "NetProfilerModule.h"
|
|
|
|
|
#include "Analyzers/NetTraceAnalyzer.h"
|
|
|
|
|
#include "AnalysisServicePrivate.h"
|
|
|
|
|
#include "Model/NetProfilerProvider.h"
|
|
|
|
|
|
2020-11-13 05:29:37 -04:00
|
|
|
namespace TraceServices
|
2019-10-03 16:26:48 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
FName FNetProfilerModule::ModuleName("TraceModule_NetProfiler");
|
|
|
|
|
|
|
|
|
|
void FNetProfilerModule::GetModuleInfo(FModuleInfo& OutModuleInfo)
|
|
|
|
|
{
|
|
|
|
|
OutModuleInfo.Name = ModuleName;
|
|
|
|
|
OutModuleInfo.DisplayName = TEXT("NetProfiler");
|
|
|
|
|
}
|
|
|
|
|
|
[Insights]
- TraceServices: Changed ReadNetProfilerProvider, ReadMemoryProvider, ReadDiagnosticsProvider to return a pointer to the respective provider (instead of a reference). Can return nullptr. The UI should not assume the provider exists.
- TraceServices: Added GetNetProfilerProviderName, GetMemoryProviderName, GetDiagnosticsProviderName, GetAllocationsProviderName to return name of respective provider.
- TraceServices: Added ReadModuleProvider + GetModuleProviderName, ReadCallstacksProvider + GetCallstacksProviderName to access respective providers.
- TraceServices: Added a default empty implementation to IModule for GenerateReports, GetLoggers and GetCommandLineArgument.
- TraceServices: Changed FAnalysisService::StartAnalysis to not create default providers for Memory (LLM Stats), NetProfiler and Diagnostics, but to allow the respective modules (FMemoryModule, FNetProfilerModule, FDiagnosticsModule) to create the providers.
- TraceInsights: Fixed UI code to check if the Memory, NetProfiler and Diagnostics provider are available.
#rb Catalin.Dragoiu, Johan.Berg
[CL 16967698 by ionut matasaru in ue5-main branch]
2021-07-27 08:18:31 -04:00
|
|
|
void FNetProfilerModule::OnAnalysisBegin(IAnalysisSession& Session)
|
|
|
|
|
{
|
2019-10-03 16:26:48 -04:00
|
|
|
FNetProfilerProvider* NetProfilerProvider = new FNetProfilerProvider(Session);
|
[Insights]
- TraceServices: Changed ReadNetProfilerProvider, ReadMemoryProvider, ReadDiagnosticsProvider to return a pointer to the respective provider (instead of a reference). Can return nullptr. The UI should not assume the provider exists.
- TraceServices: Added GetNetProfilerProviderName, GetMemoryProviderName, GetDiagnosticsProviderName, GetAllocationsProviderName to return name of respective provider.
- TraceServices: Added ReadModuleProvider + GetModuleProviderName, ReadCallstacksProvider + GetCallstacksProviderName to access respective providers.
- TraceServices: Added a default empty implementation to IModule for GenerateReports, GetLoggers and GetCommandLineArgument.
- TraceServices: Changed FAnalysisService::StartAnalysis to not create default providers for Memory (LLM Stats), NetProfiler and Diagnostics, but to allow the respective modules (FMemoryModule, FNetProfilerModule, FDiagnosticsModule) to create the providers.
- TraceInsights: Fixed UI code to check if the Memory, NetProfiler and Diagnostics provider are available.
#rb Catalin.Dragoiu, Johan.Berg
[CL 16967698 by ionut matasaru in ue5-main branch]
2021-07-27 08:18:31 -04:00
|
|
|
Session.AddProvider(GetNetProfilerProviderName(), NetProfilerProvider);
|
|
|
|
|
|
|
|
|
|
Session.AddAnalyzer(new FNetTraceAnalyzer(Session, *NetProfilerProvider));
|
2019-10-03 16:26:48 -04:00
|
|
|
}
|
|
|
|
|
|
[Insights]
- TraceServices: Changed ReadNetProfilerProvider, ReadMemoryProvider, ReadDiagnosticsProvider to return a pointer to the respective provider (instead of a reference). Can return nullptr. The UI should not assume the provider exists.
- TraceServices: Added GetNetProfilerProviderName, GetMemoryProviderName, GetDiagnosticsProviderName, GetAllocationsProviderName to return name of respective provider.
- TraceServices: Added ReadModuleProvider + GetModuleProviderName, ReadCallstacksProvider + GetCallstacksProviderName to access respective providers.
- TraceServices: Added a default empty implementation to IModule for GenerateReports, GetLoggers and GetCommandLineArgument.
- TraceServices: Changed FAnalysisService::StartAnalysis to not create default providers for Memory (LLM Stats), NetProfiler and Diagnostics, but to allow the respective modules (FMemoryModule, FNetProfilerModule, FDiagnosticsModule) to create the providers.
- TraceInsights: Fixed UI code to check if the Memory, NetProfiler and Diagnostics provider are available.
#rb Catalin.Dragoiu, Johan.Berg
[CL 16967698 by ionut matasaru in ue5-main branch]
2021-07-27 08:18:31 -04:00
|
|
|
void FNetProfilerModule::GetLoggers(TArray<const TCHAR*>& OutLoggers)
|
2019-10-03 16:26:48 -04:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-13 05:29:37 -04:00
|
|
|
} // namespace TraceServices
|