When this is polled, it logs whatever system information the Settings.ProfilingMode
indicates.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Profiling SystemProfiler
Namespace: DeltaEngine.Profiling
Assembly: DeltaEngine.Profiling (in DeltaEngine.Profiling.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The SystemProfiler type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | SystemProfiler | Initializes a new instance of the SystemProfiler class |
Methods
Name | Description | |
---|---|---|
![]() | GetProfilingResults | |
![]() | Log |
Properties
Name | Description | |
---|---|---|
![]() ![]() | Current | |
![]() | IsActive | |
![]() | MaximumPollsPerSecond |
Events
Name | Description | |
---|---|---|
![]() | Updated |
Remarks
Examples
[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