Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
VRage.Profiler.MyProfiler Class Reference

Part of MyRenderProfiler, this is per-thread profiler More...

Classes

struct  HistoryLock
 
class  MyProfilerObjectBuilderInfo
 

Public Member Functions

 MyProfiler (bool memoryProfiling, string name, string axisName)
 
void SetNewLevelLimit (int newLevelLimit)
 
HistoryLock LockHistory (out int lastValidFrame)
 
void CommitFrame ()
 Adds current frame to history and clear it Returns number of calls this frame More...
 
void ClearFrame ()
 Clears current frame. More...
 
void Reset ()
 
void InitMemoryHack (string name)
 
void StartBlock (string name, string memberName, int line, string file, int forceOrder=int.MaxValue)
 
void EndBlock (string member, int line, string file, MyTimeSpan?customTime=null, float customValue=0, string timeFormat=null, string valueFormat=null, string callFormat=null)
 
void ProfileCustomValue (string name, string member, int line, string file, float value, MyTimeSpan?customTime, string timeFormat, string valueFormat, string callFormat=null)
 
StringBuilder Dump ()
 
MyProfilerObjectBuilderInfo GetObjectBuilderInfo ()
 
void Init (MyProfilerObjectBuilderInfo data)
 

Static Public Member Functions

static MyProfilerBlock CreateExternalBlock (string name, int blockId)
 

Public Attributes

int[] TotalCalls = new int[MAX_FRAMES]
 
bool AutoCommit = true
 Enable for background workers. It will automatically commit after top level profiling block is closed More...
 
readonly bool MemoryProfiling
 
readonly Thread OwnerThread
 
readonly Stopwatch Stopwatch = new Stopwatch()
 

Static Public Attributes

static bool EnableAsserts = true
 
static readonly int MAX_FRAMES = 1024
 
static readonly int UPDATE_WINDOW = 16
 

Properties

MyProfilerBlock SelectedRoot [get, set]
 
List< MyProfilerBlockSelectedRootChildren [get]
 
List< MyProfilerBlockRootBlocks [get]
 
int LastFrameIndexDebug [get]
 
string DisplayedName [get]
 
string AxisName [get]
 
int LevelLimit [get]
 

Detailed Description

Part of MyRenderProfiler, this is per-thread profiler

Definition at line 22 of file MyProfiler.cs.

Constructor & Destructor Documentation

VRage.Profiler.MyProfiler.MyProfiler ( bool  memoryProfiling,
string  name,
string  axisName 
)
inline

Definition at line 143 of file MyProfiler.cs.

Member Function Documentation

void VRage.Profiler.MyProfiler.ClearFrame ( )
inline

Clears current frame.

Definition at line 285 of file MyProfiler.cs.

void VRage.Profiler.MyProfiler.CommitFrame ( )
inline

Adds current frame to history and clear it Returns number of calls this frame

Definition at line 190 of file MyProfiler.cs.

static MyProfilerBlock VRage.Profiler.MyProfiler.CreateExternalBlock ( string  name,
int  blockId 
)
inlinestatic

Definition at line 168 of file MyProfiler.cs.

StringBuilder VRage.Profiler.MyProfiler.Dump ( )
inline

Definition at line 435 of file MyProfiler.cs.

void VRage.Profiler.MyProfiler.EndBlock ( string  member,
int  line,
string  file,
MyTimeSpan customTime = null,
float  customValue = 0,
string  timeFormat = null,
string  valueFormat = null,
string  callFormat = null 
)
inline

Definition at line 400 of file MyProfiler.cs.

MyProfilerObjectBuilderInfo VRage.Profiler.MyProfiler.GetObjectBuilderInfo ( )
inline

Definition at line 456 of file MyProfiler.cs.

void VRage.Profiler.MyProfiler.Init ( MyProfilerObjectBuilderInfo  data)
inline

Definition at line 467 of file MyProfiler.cs.

void VRage.Profiler.MyProfiler.InitMemoryHack ( string  name)
inline

Definition at line 324 of file MyProfiler.cs.

HistoryLock VRage.Profiler.MyProfiler.LockHistory ( out int  lastValidFrame)
inline

Definition at line 179 of file MyProfiler.cs.

void VRage.Profiler.MyProfiler.ProfileCustomValue ( string  name,
string  member,
int  line,
string  file,
float  value,
MyTimeSpan customTime,
string  timeFormat,
string  valueFormat,
string  callFormat = null 
)
inline

Definition at line 429 of file MyProfiler.cs.

void VRage.Profiler.MyProfiler.Reset ( )
inline

Definition at line 303 of file MyProfiler.cs.

void VRage.Profiler.MyProfiler.SetNewLevelLimit ( int  newLevelLimit)
inline

Definition at line 174 of file MyProfiler.cs.

void VRage.Profiler.MyProfiler.StartBlock ( string  name,
string  memberName,
int  line,
string  file,
int  forceOrder = int.MaxValue 
)
inline

Definition at line 340 of file MyProfiler.cs.

Member Data Documentation

bool VRage.Profiler.MyProfiler.AutoCommit = true

Enable for background workers. It will automatically commit after top level profiling block is closed

Definition at line 78 of file MyProfiler.cs.

bool VRage.Profiler.MyProfiler.EnableAsserts = true
static

Definition at line 46 of file MyProfiler.cs.

readonly int VRage.Profiler.MyProfiler.MAX_FRAMES = 1024
static

Definition at line 47 of file MyProfiler.cs.

readonly bool VRage.Profiler.MyProfiler.MemoryProfiling

Definition at line 80 of file MyProfiler.cs.

readonly Thread VRage.Profiler.MyProfiler.OwnerThread

Definition at line 81 of file MyProfiler.cs.

readonly Stopwatch VRage.Profiler.MyProfiler.Stopwatch = new Stopwatch()

Definition at line 82 of file MyProfiler.cs.

int [] VRage.Profiler.MyProfiler.TotalCalls = new int[MAX_FRAMES]

Definition at line 72 of file MyProfiler.cs.

readonly int VRage.Profiler.MyProfiler.UPDATE_WINDOW = 16
static

Definition at line 48 of file MyProfiler.cs.

Property Documentation

string VRage.Profiler.MyProfiler.AxisName
get

Definition at line 118 of file MyProfiler.cs.

string VRage.Profiler.MyProfiler.DisplayedName
get

Definition at line 113 of file MyProfiler.cs.

int VRage.Profiler.MyProfiler.LastFrameIndexDebug
get

Definition at line 108 of file MyProfiler.cs.

int VRage.Profiler.MyProfiler.LevelLimit
get

Definition at line 123 of file MyProfiler.cs.

List<MyProfilerBlock> VRage.Profiler.MyProfiler.RootBlocks
get

Definition at line 103 of file MyProfiler.cs.

MyProfilerBlock VRage.Profiler.MyProfiler.SelectedRoot
getset

Definition at line 92 of file MyProfiler.cs.

List<MyProfilerBlock> VRage.Profiler.MyProfiler.SelectedRootChildren
get

Definition at line 98 of file MyProfiler.cs.


The documentation for this class was generated from the following file: