Class MemAssertion
The MemAssertion class provides static methods for making assertions about the memory usage of the profiled process.
Inheritance
Inherited Members
Namespace: SciTech.NetMemProfiler
Assembly: SciTech.MemProfilerApi.dll
Syntax
public static class MemAssertion
Methods
Name | Description |
---|---|
Assert(AssertionsDefinition) | Asserts that the memory usage since the last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot meets the memory usage defined by the supplied AssertionsDefinition. Only instances created by the calling thread will be checked by this assertion. |
Assert(AssertionsDefinition, AssertionsThread) | Asserts that the memory usage since the last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot meets the memory usage defined by the supplied AssertionsDefinition. |
Assert(MemSnapshot, AssertionsDefinition) | Asserts that the memory usage since the noteAllocations for all threads are always considered for the allocation assertions (AssertionsDefinition.MaxAllocations and AssertionsDefinition.MaxAllocatedBytes). |
Assert(MemSnapshot, AssertionsDefinition, AssertionsThread) | Asserts that the memory usage since the |
BeginAssertions() | Begins an assertions session. An assertions session is used to reduce the number of garbage collections performed when doing memory assertions and to avoid memory side effects. |
BeginAssertionsDefinition(AssertionsThread) | Begins an assertions session and creates an AssertionsDefinition. An assertions session is used to reduce the number of garbage collections performed when doing memory assertions and to avoid memory side effects. |
BeginAssertionsDefinition(MemSnapshot, AssertionsThread) | Begins an assertions session and creates an AssertionsDefinition. An assertions session is used to reduce the number of garbage collections performed when doing memory assertions and to avoid memory side effects. |
EndAssertions() | Ends an assertions session previously started by a call to BeginAssertions(). |
NoInstances(String) | This NoInstances assertion accepts a single type name. The type name can end with a '' to allow all types starting with a common string to be matched. This can be used to include all types in a namespace (e.g. "System.Windows.Forms." will include all types in the System.Windows.Forms namespace). |
NoInstances(String[]) | This NoInstances assertion accepts an array of type names to check. The type names can end with a '' to allow all types starting with a common string to be matched. This can be used to include all types in a namespace (e.g. "System.Windows.Forms." will include all types in the System.Windows.Forms namespace). |
NoInstances(Type) | This NoInstances assertion accepts a single System.Type. Subclasses will not be checked. |
NoInstances(Type, Boolean) | This NoInstances assertion accepts a single System.Type and boolean parameter indicating whether subclasses should be included. |
NoInstances(Type[]) | This NoInstances assertion accepts an array of System.Types to check. Subclasses will not be checked. |
NoInstances(Type[], Boolean) | This NoInstances assertion accepts an array of System.Types to check and a boolean parameter indicating whether subclasses should be included. |
NoNewInstances() | This NoNewInstances method will assert that no live instances, created by the calling thread, exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot. |
NoNewInstances(AssertionsThread) | This NoNewInstances assertion takes a single AssertionsThread parameter. It will assert that no live instances exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(MemSnapshot) | This NoNewInstances method will assert that no live instances, created by the calling thread, exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. |
NoNewInstances(MemSnapshot, AssertionsThread) | This NoNewInstances method will assert that no live instances exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(MemSnapshot, String) | This NoNewInstances assertion will assert that no live instances of the type with the specified name exist on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. |
NoNewInstances(MemSnapshot, String, AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the type with the specified name exist on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(MemSnapshot, String[]) | This NoNewInstances assertion will assert that no live instances of the types with the specified names exist on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. |
NoNewInstances(MemSnapshot, Type) | This NoNewInstances assertion will assert that no live instances of the specified Type exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. |
NoNewInstances(MemSnapshot, Type, AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the specified Type exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(MemSnapshot, Type, Boolean) | This NoNewInstances assertion will assert that no live instances of the specified Type (and optionally its subclasses) exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. |
NoNewInstances(MemSnapshot, Type, Boolean, AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the specified Type (and optionally its subclasses) exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(MemSnapshot, Type[]) | This NoNewInstances assertion will assert that no live instances of the specified Types exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. |
NoNewInstances(MemSnapshot, Type[], AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the specified Types exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(MemSnapshot, Type[], Boolean) | This NoNewInstances assertion will assert that no live instances of the specified Types (and optionally their subclasses) exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. |
NoNewInstances(MemSnapshot, Type[], Boolean, AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the specified Types (and optionally their subclasses) exists on the GC heap that did not exist on the GC heap at the time of the comparison snapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(String) | This NoNewInstances assertion will assert that no live instances of the type with the specified name exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. |
NoNewInstances(String, AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the type with the specified name exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(String[]) | This NoNewInstances assertion will assert that no live instances of the types with the specified names exist on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. |
NoNewInstances(String[], AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the types with the specified names exist on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(Type) | This NoNewInstances assertion will assert that no live instances of the specified Type exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. |
NoNewInstances(Type, AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the specified Type exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(Type, Boolean) | This NoNewInstances assertion will assert that no live instances of the specified Type (and optionally its subclasses) exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. |
NoNewInstances(Type, Boolean, AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the specified Type (and optionally its subclasses) exists on the GC heap that did not exist on the GC heap at the time of last call to FastSnapshot(Boolean) or MemProfiler.FullSnapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(Type[]) | This NoNewInstances assertion will assert that no live instances of the specified Types exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. |
NoNewInstances(Type[], AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the specified Types exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstances(Type[], Boolean) | This NoNewInstances assertion will assert that no live instances of the specified Types (and optionally their subclasses) exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. |
NoNewInstances(Type[], Boolean, AssertionsThread) | This NoNewInstances assertion will assert that no live instances of the specified Types (and optionally their subclasses) exists on the GC heap that did not exist on the GC heap at the time of last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstancesExcept(MemSnapshot, String) | This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the type with the specified name. |
NoNewInstancesExcept(MemSnapshot, String, AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the comparison
snapshot, are instances
of the type with the specified name.
Depending on the |
NoNewInstancesExcept(MemSnapshot, String[]) | This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of one of the types with specified names. |
NoNewInstancesExcept(MemSnapshot, String[], AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the comparison
snapshot, are instances
of one of the types with the specified names.
Depending on the |
NoNewInstancesExcept(MemSnapshot, Type) | This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the specified System.Type. |
NoNewInstancesExcept(MemSnapshot, Type, AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the comparison
snapshot, are instances
of the specified System.Type.
Depending on the |
NoNewInstancesExcept(MemSnapshot, Type, Boolean) | This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the specified System.Type, or optionally one of its subclasses. |
NoNewInstancesExcept(MemSnapshot, Type, Boolean, AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of the specified System.Type, or optionally one of its subclasses. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstancesExcept(MemSnapshot, Type[]) | This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of one of the specified System.Types. |
NoNewInstancesExcept(MemSnapshot, Type[], AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the comparison
snapshot, are instances
of one of the specified System.Types.
Depending on the |
NoNewInstancesExcept(MemSnapshot, Type[], Boolean) | This NoNewInstances method will assert that the only new live instances, created since the comparison snapshot, are instances of one of the specified System.Types, or optionally one of their subclasses. |
NoNewInstancesExcept(MemSnapshot, Type[], Boolean, AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the comparison
snapshot, are instances
of one of the specified System.Types, or optionally one of their subclasses.
Depending on the |
NoNewInstancesExcept(String) | This NoNewInstances method will assert that the only new live instances, created since the last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances of the specified type with the specified name. |
NoNewInstancesExcept(String, AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the last
call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances
of the type with the specified name.
Depending on the |
NoNewInstancesExcept(String[]) | This NoNewInstances method will assert that the only new live instances, created since the last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances of one of the types with the specified names. |
NoNewInstancesExcept(String[], AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the last
call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances
of one of the types with the specified names.
Depending on the |
NoNewInstancesExcept(Type) | This NoNewInstances method will assert that the only new live instances, created since the last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances of the specified System.Type. |
NoNewInstancesExcept(Type, AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the last
call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances
of the specified System.Type.
Depending on the |
NoNewInstancesExcept(Type, Boolean) | This NoNewInstances method will assert that the only new live instances, created since the last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances of the specified System.Type, or optionally one of its subclasses. |
NoNewInstancesExcept(Type, Boolean, AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances of the specified System.Type, or optionally one of its subclasses. Depending on the assertionsThread parameter, all new instances or only instances created by the calling thread, will be checked. |
NoNewInstancesExcept(Type[]) | This NoNewInstances method will assert that the only new live instances, created since the last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances of one of the specified System.Types. |
NoNewInstancesExcept(Type[], AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the last
call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances
of one of the specified System.Types.
Depending on the |
NoNewInstancesExcept(Type[], Boolean) | This NoNewInstances method will assert that the only new live instances, created since the last call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances of one of the specified System.Types, or optionally one of their subclasses. |
NoNewInstancesExcept(Type[], Boolean, AssertionsThread) | This NoNewInstances method will assert that the only new live instances, created since the last
call to MemProfiler.FastSnapshot or MemProfiler.FullSnapshot, are instances
of one of the specified System.Types, or optionally one of their subclasses.
Depending on the |
Events
Name | Description |
---|---|
AssertionFailed | Invoked when a memory assertion has failed. |