Table of Contents

Class FrameProfilerUtil

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public class FrameProfilerUtil
Inheritance
FrameProfilerUtil
Inherited Members

Constructors

FrameProfilerUtil(Action<string>)

public FrameProfilerUtil(Action<string> onLogoutputHandler)

Parameters

onLogoutputHandler Action<string>

FrameProfilerUtil(string)

Used to create a FrameProfilerUtil on threads other than the main thread

public FrameProfilerUtil(string outputPrefix)

Parameters

outputPrefix string

Fields

Enabled

public bool Enabled

Field Value

bool

OutputPrefix

public string OutputPrefix

Field Value

string

PrevRootEntry

public ProfileEntryRange PrevRootEntry

Field Value

ProfileEntryRange

PrintSlowTicks

public bool PrintSlowTicks

Field Value

bool

PrintSlowTicksThreshold

public int PrintSlowTicksThreshold

Field Value

int

PrintSlowTicksThreshold_Offthreads

public static int PrintSlowTicksThreshold_Offthreads

Field Value

int

PrintSlowTicks_Offthreads

public static bool PrintSlowTicks_Offthreads

Field Value

bool

offThreadProfiles

public static ConcurrentQueue<string> offThreadProfiles

Field Value

ConcurrentQueue<string>

summary

public string summary

Field Value

string

Methods

Begin(string)

Called by the game engine for each render frame or server tick

public void Begin(string beginText = null)

Parameters

beginText string

End()

Called by the game engine at the end of the render frame or server tick

public void End()

Enter(string)

public ProfileEntryRange Enter(string code)

Parameters

code string

Returns

ProfileEntryRange

Leave()

Same as Mark(string) when Enter(string) was called before.

public void Leave()

Mark(string)

Use this method to add a frame profiling marker, will set or add the time ellapsed since the previous mark to the frame profiling reults.

public void Mark(string code)

Parameters

code string

OffThreadEnd()

public void OffThreadEnd()