Files
UnrealEngineUWP/Engine/Source/Programs/Shared/EpicGames.Core/ScopeProfiler.cs
Ben Marsh cda1b66bba Reformat EpicGames.Core according to standard coding conventions.
#preflight 623cd2e84368f558e30b4a9e

[CL 19502309 by Ben Marsh in ue5-main branch]
2022-03-24 16:35:00 -04:00

73 lines
2.1 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
namespace EpicGames.Core
{
#if !__SCOPEPROFILER_AVAILABLE__
#pragma warning disable IDE0060 // Remove unused parameter
/// <summary>
/// A stub/no-op scope-profiler API that can be replaced by another implementation to record execution of
/// instrumented scopes.
/// </summary>
public class ScopeProfiler
{
public static ScopeProfiler Instance = new ScopeProfiler();
public void InitializeAndStart(string programName, string hostAddress, int maxThreadCount) { }
public void StopAndShutdown() { }
/// <summary>
/// Start a stacked scope. Must start and end on the same thread
/// </summary>
/// <param name="name"></param>
/// <param name="bIsStall"></param>
public void StartScope(string name, bool bIsStall) { }
/// <summary>
/// End a stacked scope. Must start and end on the same thread.
/// </summary>
public void EndScope() { }
/// <summary>
/// Record an un-stacked time span at a specified time.
/// </summary>
/// <param name="name"></param>
/// <param name="id"></param>
/// <param name="bStall"></param>
/// <param name="beginThreadId"></param>
/// <param name="endThreadId"></param>
/// <param name="startTime">start time for the span (use FastTime())</param>
/// <param name="endTime">end time for the span (use FastTime())</param>
public void AddSpanAtTime(string name, ulong id, bool bStall, uint beginThreadId, uint endThreadId, ulong startTime, ulong endTime) { }
/// <summary>
/// Record a value against a particular name, to be plotted over time
/// </summary>
/// <param name="name"></param>
/// <param name="value"></param>
public void Plot(string name, double value) { }
/// <summary>
/// Generate a timestamp value for the current moment.
/// </summary>
/// <returns></returns>
public ulong FastTime()
{
return 0;
}
/// <summary>
/// Retrieve the profiler's identifier for the current thread
/// </summary>
/// <returns></returns>
public uint GetCurrentThreadId()
{
return 0;
}
}
#pragma warning restore IDE0060 // Remove unused parameter
#endif
}