PageRenderTime 51ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/Utilities/Profiling/IProfiler.cs

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