Class MemProfiler
The MemProfiler class provides static methods for interacting with the profiler, from within the profiled process.
Inheritance
Inherited Members
Namespace: SciTech.NetMemProfiler
Assembly: SciTech.MemProfilerApi.dll
Syntax
public static class MemProfiler
Properties
Name | Description |
---|---|
AreAssertionsEnabled | Gets a bool value indicating whether memory assertions are enabled. |
IsProfiling | Gets a bool value indicating whether .NET Memory Profiler is profiling the current process. |
Methods
Name | Description |
---|---|
AddRealTimeComment(String) | Adds a comment that can be viewed in the real-time graph in .NET Memory Profiler. noteIf profiling is not active, this method does nothing. |
AddRealTimeComment(String, String) | Adds a comment that can be viewed in the real-time graph in .NET Memory Profiler. noteIf profiling is not active, this method does nothing. |
BeginTest() | Notifies that a unit test case is started. Either the returned value must be disposed, or calling this method must be matched
with a call to EndTest().
Any full snapshots that are collected between
the calls to |
BeginTest(String) | Notifies that a unit test case is started. Either the returned value must be disposed, or calling this method must be matched
with a call to EndTest().
Any full snapshots that are collected between
the calls to |
EndTest() | Notifies that a unit test case is ended. Any full snapshots that are collected between
the call to BeginTest and |
FastSnapshot() | Performs a fast snapshot of the garbage collected heap. The returned MemSnapshot can be used in subsequent calls to the MemAssertion and MemProfiler.GetMemoryUsage methods. |
FastSnapshot(Boolean) | Performs a fast snapshot of the garbage collected heap. The returned MemSnapshot can be used in subsequent calls to the MemAssertion and MemProfiler.GetMemoryUsage methods. |
FullSnapshot(Boolean) | Collects a full snapshot and allows .NET Memory Profiler to assign a default name to the snapshot. |
FullSnapshot(String, Boolean) | Collects a full snapshot and provides the name of the snapshot. |
GetMemoryUsage() | Gets information about the managed memory usage that has occurred since the last stored snapshot, or since the start of the process if no snapshot is stored. |
GetMemoryUsage(MemSnapshot) | Gets information about the managed memory usage that has occurred since the specified base snapshot. |