public void TearDown() { Console.WriteLine( "DBIndex objects: " + OmniaMeaBTree.GetObjectsCount() + ", memory used: " + OmniaMeaBTree.GetUsedMemory() ); RemoveFiles(); }
private void _tmrUpdate_Tick(object sender, System.EventArgs e) { long managedMemory = GC.GetTotalMemory(true); long privateBytes = _ctrPrivateBytes.NextSample().RawValue; long bytesInAllHeaps = _ctrBytesInAllHeaps.NextSample().RawValue; long bytesCommitted = _ctrBytesCommitted.NextSample().RawValue; uint win32Heaps = Win32Heaps.TotalHeapSize(); int dbIndexHeapSize = OmniaMeaBTree.GetUsedMemory(); int dbIndexObjectsCount = OmniaMeaBTree.GetObjectsCount(); int mapiHeapSize = EMAPILib.EMAPISession.HeapSize(); int mapiObjectsCount = EMAPILib.EMAPISession.ObjectsCount(); _lblTotalMemory.Text = "Total Memory:" + FormatMemorySize(privateBytes); _lblManagedMemory.Text = "Managed Memory: " + FormatMemorySize(managedMemory); _lblHeapFreeSize.Text = "Managed Heap Free Size: " + FormatMemorySize(bytesInAllHeaps - managedMemory); _lblManagedHeapOverhead.Text = "Managed Heap Overhead: " + FormatMemorySize(bytesCommitted - bytesInAllHeaps); _lblWin32HeapSize.Text = "Win32 Heap Size: " + FormatMemorySize(win32Heaps); _lblOtherMemorySize.Text = "Other Memory: " + FormatMemorySize(privateBytes - bytesCommitted - win32Heaps); _dbindexHeapInfo.Text = "DBIndex Heap Size: " + FormatMemorySize(dbIndexHeapSize) + ", DBIndex Objects Count: " + dbIndexObjectsCount; _mapiHeapInfo.Text = "MAPI Heap Size: " + FormatMemorySize(mapiHeapSize) + ", MAPI Objects Count: " + mapiObjectsCount; }