You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Added QA-only Oodle clientside analytics.
#rb none [FYI] Ryan.Gerleve #ROBOMERGE-SOURCE: CL 7647742 via CL 7647771 #ROBOMERGE-BOT: (v372-7473910) [CL 7647773 by john barrett in Main branch]
This commit is contained in:
+11
-2
@@ -191,7 +191,6 @@ void FOodleNetAnalyticsData::SendAnalytics()
|
||||
UE_LOG(OodleHandlerComponentLog, Log, TEXT(" - OutAttemptedSavingsWithOverheadPercentTotal: %i"), OutAttemptedSavingsWithOverheadPercentTotal);
|
||||
|
||||
|
||||
static const FString EZEventName = TEXT("Oodle.Stats");
|
||||
static const FString EZAttrib_InCompressedNum = TEXT("InCompressedNum");
|
||||
static const FString EZAttrib_InNotCompressedNum = TEXT("InNotCompressedNum");
|
||||
static const FString EZAttrib_InCompressedWithOverheadLengthTotal = TEXT("InCompressedWithOverheadLengthTotal");
|
||||
@@ -258,6 +257,16 @@ void FOodleNetAnalyticsData::SendAnalytics()
|
||||
EZAttrib_OutAttemptedSavingsWithOverheadPercentTotal, OutAttemptedSavingsWithOverheadPercentTotal
|
||||
);
|
||||
|
||||
AnalyticsProvider->RecordEvent(EZEventName, EventAttributes);
|
||||
AnalyticsProvider->RecordEvent(GetAnalyticsEventName(), EventAttributes);
|
||||
}
|
||||
}
|
||||
|
||||
const TCHAR* FOodleNetAnalyticsData::GetAnalyticsEventName() const
|
||||
{
|
||||
return TEXT("Oodle.Stats");
|
||||
}
|
||||
|
||||
const TCHAR* FClientOodleNetAnalyticsData::GetAnalyticsEventName() const
|
||||
{
|
||||
return TEXT("Oodle.ClientStats");
|
||||
}
|
||||
|
||||
+10
-1
@@ -1267,7 +1267,16 @@ void OodleHandlerComponent::NotifyAnalyticsProvider()
|
||||
|
||||
if (Handler->GetProvider().IsValid() && Aggregator.IsValid())
|
||||
{
|
||||
NetAnalyticsData = REGISTER_NET_ANALYTICS(Aggregator, FOodleNetAnalyticsData, TEXT("Oodle.Stats"));
|
||||
const bool bIsServer = (Handler->Mode == Handler::Mode::Server);
|
||||
|
||||
if (bIsServer)
|
||||
{
|
||||
NetAnalyticsData = REGISTER_NET_ANALYTICS(Aggregator, FOodleNetAnalyticsData, TEXT("Oodle.Stats"));
|
||||
}
|
||||
else
|
||||
{
|
||||
NetAnalyticsData = REGISTER_NET_ANALYTICS(Aggregator, FClientOodleNetAnalyticsData, TEXT("Oodle.ClientStats"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+17
-1
@@ -89,7 +89,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* Oodle implementation for threaded net analytics data - the threading is taken care of, just need to send off the analytics
|
||||
* Oodle implementation for (serverside) threaded net analytics data - threading is taken care of, just need to send off the analytics
|
||||
*/
|
||||
struct FOodleNetAnalyticsData :
|
||||
#if NET_ANALYTICS_MULTITHREADING
|
||||
@@ -108,5 +108,21 @@ public:
|
||||
return this;
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Returns the analytics event name to use - to be overridden in subclasses
|
||||
*/
|
||||
virtual const TCHAR* GetAnalyticsEventName() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* Clientside version of the above net analytics data (typically only used for debugging)
|
||||
*/
|
||||
struct FClientOodleNetAnalyticsData : public FOodleNetAnalyticsData
|
||||
{
|
||||
virtual const TCHAR* GetAnalyticsEventName() const override;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2248,6 +2248,11 @@ void UNetDriver::SetAnalyticsProvider(TSharedPtr<IAnalyticsProvider> InProvider)
|
||||
ConnectionlessHandler->NotifyAnalyticsProvider(AnalyticsProvider, AnalyticsAggregator);
|
||||
}
|
||||
|
||||
if (ServerConnection != nullptr)
|
||||
{
|
||||
ServerConnection->NotifyAnalyticsProvider();
|
||||
}
|
||||
|
||||
for (UNetConnection* CurConn : ClientConnections)
|
||||
{
|
||||
if (CurConn != nullptr)
|
||||
|
||||
Reference in New Issue
Block a user