PageRenderTime 127ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 59ms app.codeStats 4ms

/Utilities/Profiling/IProfiler.cs

#
C# | 50 lines | 17 code | 5 blank | 28 comment | 0 complexity | 5b64a71c0661a65b3b70c167c279c4b3 MD5 | raw file
 1using System;
 2
 3namespace Delta.Utilities.Profiling
 4{
 5	/// <summary>
 6	/// Interface for the profiler module, which basically just shows
 7	/// the Fps, Module, System or Simulator information via the
 8	/// ProfilingGraphics module that is created dynamically if needed.
 9	/// flagDescription is a really bad name!
10	/// try to ignore really short (basically empty) start/stop calls with 0.000ms!
11	/// this should not need a flagDescription, it should just close the last opened profiling flag.
12	/// more features that need exposing (see section below)?
13	/// remove IsProfilerEnabled and do it differently, but for now I do not have a better solution
14	/// </summary>
15	public interface IProfiler
16	{
17		#region Start/Stop Profiling Flags
18		/// <summary>
19		/// Set start flag
20		/// </summary>
21		/// <param name="flagDescription">Flag description</param>
22		void Start(string flagDescription);
23
24		/// <summary>
25		/// Set end flag
26		/// </summary>
27		/// <param name="flagDescription">Flag description</param>
28		void Stop(string flagDescription);
29		#endregion
30
31		#region AddLoadedContentSize
32		/// <summary>
33		/// Helper method to count how much content we are actually loading
34		/// in bytes. This is only used in the System profiling mode.
35		/// </summary>
36		/// <param name="contentSizeInBytes">
37		/// Content size in bytes for profiling.
38		/// </param>
39		void AddLoadedContentSize(int contentSizeInBytes);
40		#endregion
41
42		#region NewFrame
43		/// <summary>
44		/// Update some per frame values, Marks beginning of new Frame
45		/// </summary>
46		void NewFrame();
47		#endregion
48
49	}
50}