1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 2009 Oracle. All rights reserved. 5 * 6 */ 7using System; 8using System.Collections.Generic; 9using System.Text; 10 11namespace BerkeleyDB { 12 /// <summary> 13 /// Statistical information about the mutex subsystem 14 /// </summary> 15 public class MutexStats { 16 private Internal.MutexStatStruct st; 17 internal MutexStats(Internal.MutexStatStruct stats) { 18 st = stats; 19 } 20 21 /// <summary> 22 /// Mutex alignment 23 /// </summary> 24 public uint Alignment { get { return st.st_mutex_align; } } 25 /// <summary> 26 /// Available mutexes 27 /// </summary> 28 public uint Available { get { return st.st_mutex_free; } } 29 /// <summary> 30 /// Mutex count 31 /// </summary> 32 public uint Count { get { return st.st_mutex_cnt; } } 33 /// <summary> 34 /// Mutexes in use 35 /// </summary> 36 public uint InUse { get { return st.st_mutex_inuse; } } 37 /// <summary> 38 /// Maximum mutexes ever in use 39 /// </summary> 40 public uint MaxInUse { get { return st.st_mutex_inuse_max; } } 41 /// <summary> 42 /// Region lock granted without wait. 43 /// </summary> 44 public ulong RegionNoWait { get { return st.st_region_nowait; } } 45 /// <summary> 46 /// Region size. 47 /// </summary> 48 public ulong RegionSize { get { return (ulong)st.st_regsize.ToInt64(); } } 49 /// <summary> 50 /// Region lock granted after wait. 51 /// </summary> 52 public ulong RegionWait { get { return st.st_region_wait; } } 53 /// <summary> 54 /// Mutex test-and-set spins 55 /// </summary> 56 public uint TASSpins { get { return st.st_mutex_tas_spins; } } 57 } 58}