dotMemory Unit
 
Get dotMemory Unit

Complex Cases. Traffic Class

Last modified: 05 September 2023

In dotMemory Unit, memory traffic is represented with the Traffic type. The object of the Traffic type is returned as a result of the Memory.GetTrafficFrom* method.

To slice and dice traffic data, you should use a lambda expression passed to the Where method of the Traffic type. The Where method also returns an instance of the Traffic type allowing you to build chains of Where methods.

The Traffic type allows you to get data about allocated and collected memory using two properties: AllocatedMemory and CollectedMemory. These properties, in turn, have the ObjectsCount and SizeInBytes properties that you can use in test assertions.