/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2009 Oracle. All rights reserved.
*
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace BerkeleyDB {
///
/// Statistical information about the mutex subsystem
///
public class MutexStats {
private Internal.MutexStatStruct st;
internal MutexStats(Internal.MutexStatStruct stats) {
st = stats;
}
///
/// Mutex alignment
///
public uint Alignment { get { return st.st_mutex_align; } }
///
/// Available mutexes
///
public uint Available { get { return st.st_mutex_free; } }
///
/// Mutex count
///
public uint Count { get { return st.st_mutex_cnt; } }
///
/// Mutexes in use
///
public uint InUse { get { return st.st_mutex_inuse; } }
///
/// Maximum mutexes ever in use
///
public uint MaxInUse { get { return st.st_mutex_inuse_max; } }
///
/// Region lock granted without wait.
///
public ulong RegionNoWait { get { return st.st_region_nowait; } }
///
/// Region size.
///
public ulong RegionSize { get { return (ulong)st.st_regsize.ToInt64(); } }
///
/// Region lock granted after wait.
///
public ulong RegionWait { get { return st.st_region_wait; } }
///
/// Mutex test-and-set spins
///
public uint TASSpins { get { return st.st_mutex_tas_spins; } }
}
}