Beispiel #1
0
void FFrameProfiler::Start()
{
	if (!bActive)
	{
		bActive = true;
		StatsMasterEnableAdd();


		const FStatsThreadState& Stats = FStatsThreadState::GetLocalState();

		OnNewFrameDelegateHandle = Stats.NewFrameDelegate.AddRaw(this, &FFrameProfiler::OnNewFrame);
	}
}
void FFrameProfiler::Start()
{
    if (!bActive)
    {
        bActive = true;
        StatsMasterEnableAdd();


        const FStatsThreadState& Stats = FStatsThreadState::GetLocalState();

#if TARGET_UE4_CL >= CL_DEPRECATEDEL
        OnNewFrameDelegateHandle = Stats.NewFrameDelegate.AddRaw(this, &FFrameProfiler::OnNewFrame);
#else
        Stats.NewFrameDelegate.AddRaw(this, &FFrameProfiler::OnNewFrame);
#endif
    }
}
Beispiel #3
0
void FStatsWriteFile::Start( FString const& InFilename, bool bIsRawStatsFile )
{
	const FString PathName = *(FPaths::ProfilingDir() + TEXT( "UnrealStats/" ));

	FString Filename = PathName + InFilename;
	FString Path = FPaths::GetPath( Filename );
	IFileManager::Get().MakeDirectory( *Path, true );

	UE_LOG( LogStats, Log, TEXT( "Opening stats file: %s" ), *Filename );

	File = IFileManager::Get().CreateFileWriter( *Filename );
	if( !File )
	{
		UE_LOG( LogStats, Error, TEXT( "Could not open: %s" ), *Filename );
	}
	else
	{
		ArchiveFilename = Filename;
		AddNewFrameDelegate();
		WriteHeader( bIsRawStatsFile );
		StatsMasterEnableAdd();
	}
}