SystemProfiler ClassDelta Engine Documentation
When this is polled, it logs whatever system information the Settings.ProfilingMode indicates. View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Profiling SystemProfiler

Namespace: DeltaEngine.Profiling
Assembly: DeltaEngine.Profiling (in DeltaEngine.Profiling.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class SystemProfiler : SystemProfilingProvider

The SystemProfiler type exposes the following members.

Constructors

  NameDescription
Public methodSystemProfiler
Initializes a new instance of the SystemProfiler class
Top
Methods

  NameDescription
Public methodGetProfilingResults
Public methodLog
Top
Properties

  NameDescription
Public propertyStatic memberCurrent
Public propertyIsActive
Public propertyMaximumPollsPerSecond
Top
Events

  NameDescription
Public eventUpdated
Top
Remarks

Tests: DeltaEngine.Profiling.Tests.SystemProfilerTests
Examples

10 unit tests call DeltaEngine.Profiling.SystemProfiler
[Test, CloseAfterFirstFrame]
public void VerifyDefaultProperties()
{
    Assert.IsFalse(SystemProfiler.Current.IsActive);
    Assert.AreEqual(10, SystemProfiler.Current.MaximumPollsPerSecond);
    Assert.IsTrue(new SystemProfiler().IsActive);
    Assert.AreEqual(10, new SystemProfiler().MaximumPollsPerSecond);
}
[Test, CloseAfterFirstFrame]
public void ChangeMaximumPollsPerSecond()
{
    var profiler = new SystemProfiler();
    profiler.MaximumPollsPerSecond = 2;
    Assert.AreEqual(2, profiler.MaximumPollsPerSecond);
}
[Test, CloseAfterFirstFrame]
public void LogInfo()
{
    var profiler = new SystemProfiler();
    profiler.Log(ProfilingMode.Fps, systemInformation);
    SystemProfilerSection results = profiler.GetProfilingResults(ProfilingMode.Fps);
    Assert.IsTrue(results.TotalValue > 0.0f);
    Assert.AreEqual(1, results.Calls);
}
See Also