Skip to content
Snippets Groups Projects
Commit 67c43665 authored by Sebastian Pape's avatar Sebastian Pape
Browse files

Refactoring Insight Tracing Code

parent 6bb1d7b9
No related branches found
No related tags found
2 merge requests!9Update current master to develop,!54.26
...@@ -138,59 +138,24 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked() ...@@ -138,59 +138,24 @@ void FNDisplayLaunchButtonModule::PluginButtonClicked()
GEngine->AddOnScreenDebugMessage(-1, 3, FColor::White, TEXT("The Button is set to do nothing.")); GEngine->AddOnScreenDebugMessage(-1, 3, FColor::White, TEXT("The Button is set to do nothing."));
return; return;
} }
FString InsightParameters = ""; FString InsightParameters = "";
if(Settings->bEnableInsights) if(Settings->bEnableInsights)
{ {
if (Settings->bStatNamedEvents) if (Settings->bStatNamedEvents) InsightParameters.Append("-statnamedevents");
{
InsightParameters.Append("-statnamedevents"); TArray<FString> TraceChannels;
} if (Settings->bLog) TraceChannels.Add("log");
FString TraceChannels = ""; if (Settings->bBookmark) TraceChannels.Add("bookmark");
if (Settings->bLog) if (Settings->bFrame) TraceChannels.Add("frame");
{ if (Settings->bCPU) TraceChannels.Add("cpu");
TraceChannels.Append("log,"); if (Settings->bGPU) TraceChannels.Add("gpu");
} if (Settings->bLoadTime) TraceChannels.Add("loadtime");
if (Settings->bBookmark) if (Settings->bFile) TraceChannels.Add("file");
{ if (Settings->bNet) TraceChannels.Add("net");
TraceChannels.Append("bookmark,"); if (TraceChannels.Num() > 0) InsightParameters.Append(FString::Printf(TEXT(" -trace=%s"), *FString::Join(TraceChannels, TEXT(","))));
}
if (Settings->bFrame) if (Settings->TracehostIP.Len() > 0) InsightParameters.Append(FString::Printf(TEXT(" -tracehost=%s"), *Settings->TracehostIP));
{
TraceChannels.Append("frame,");
}
if (Settings->bCPU)
{
TraceChannels.Append("cpu,");
}
if (Settings->bGPU)
{
TraceChannels.Append("gpu,");
}
if (Settings->bLoadTime)
{
TraceChannels.Append("loadtime,");
}
if (Settings->bFile)
{
TraceChannels.Append("file,");
}
if (Settings->bNet)
{
TraceChannels.Append("net,");
}
if (TraceChannels.Len() > 0)
{
// There's probably a better way of doing this...
TraceChannels.RemoveFromEnd(",");
InsightParameters.Append(" -trace=");
InsightParameters.Append(TraceChannels);
}
if (Settings->TracehostIP.Len() > 0)
{
InsightParameters.Append(" -tracehost=");
InsightParameters.Append(Settings->TracehostIP);
}
InsightParameters.RemoveFromStart(" ");
} }
/* Disable Plugins temporarily */ /* Disable Plugins temporarily */
......
...@@ -34,9 +34,6 @@ public: ...@@ -34,9 +34,6 @@ public:
UPROPERTY(EditAnywhere, config, Category = "General", meta = (DisplayName = "Start ")) UPROPERTY(EditAnywhere, config, Category = "General", meta = (DisplayName = "Start "))
TEnumAsByte<ButtonLaunchType> LaunchType = ButtonLaunchType_MiniCAVE; TEnumAsByte<ButtonLaunchType> LaunchType = ButtonLaunchType_MiniCAVE;
UPROPERTY(EditAnywhere, config, Category = "General", meta = (DisplayName = "Unreal Insights "))
bool bEnableInsights = false;
/* /*
* TwoScreen Options * TwoScreen Options
*/ */
...@@ -137,6 +134,8 @@ public: ...@@ -137,6 +134,8 @@ public:
/* /*
* Insights Options * Insights Options
*/ */
UPROPERTY(EditAnywhere, config, Category = "General|Insights", meta = (DisplayName = "Unreal Insights "))
bool bEnableInsights = false;
UPROPERTY(EditAnywhere, config, Category = "General|Insights", meta = (DisplayName = "Stat Named Events", EditCondition = "bEnableInsights==true")) UPROPERTY(EditAnywhere, config, Category = "General|Insights", meta = (DisplayName = "Stat Named Events", EditCondition = "bEnableInsights==true"))
bool bStatNamedEvents = true; bool bStatNamedEvents = true;
UPROPERTY(EditAnywhere, config, Category = "General|Insights", meta = (DisplayName = "Tracehost IP", EditCondition = "bEnableInsights==true")) UPROPERTY(EditAnywhere, config, Category = "General|Insights", meta = (DisplayName = "Tracehost IP", EditCondition = "bEnableInsights==true"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment