/*-
* 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 logging subsystem
///
public class LogStats {
private Internal.LogStatStruct st;
internal LogStats(Internal.LogStatStruct stats) {
st = stats;
}
///
/// Log buffer size.
///
public uint BufferSize { get { return st.st_lg_bsize; } }
///
/// Bytes to log.
///
public uint Bytes { get { return st.st_w_bytes; } }
///
/// Bytes to log since checkpoint.
///
public uint BytesSinceCheckpoint { get { return st.st_wc_bytes; } }
///
/// Current log file number.
///
public uint CurrentFile { get { return st.st_cur_file; } }
///
/// Current log file offset.
///
public uint CurrentOffset { get { return st.st_cur_offset; } }
///
/// Known on disk log file number.
///
public uint DiskFileNumber { get { return st.st_disk_file; } }
///
/// Known on disk log file offset.
///
public uint DiskOffset { get { return st.st_disk_offset; } }
///
/// Log file size.
///
public uint FileSize { get { return st.st_lg_size; } }
///
/// Megabytes to log.
///
public uint MBytes { get { return st.st_w_mbytes; } }
///
/// Megabytes to log since checkpoint.
///
public uint MBytesSinceCheckpoint { get { return st.st_wc_mbytes; } }
///
/// Log file magic number.
///
public uint MagicNumber { get { return st.st_magic; } }
///
/// Max number of commits in a flush.
///
public uint MaxCommitsPerFlush { get { return st.st_maxcommitperflush; } }
///
/// Min number of commits in a flush.
///
public uint MinCommitsPerFlush { get { return st.st_mincommitperflush; } }
///
/// Overflow writes to the log.
///
public ulong OverflowWrites { get { return st.st_wcount_fill; } }
///
/// Log file permissions mode.
///
public int PermissionsMode { get { return st.st_mode;}}
///
/// Total I/O reads from the log.
///
public ulong Reads { get { return st.st_rcount; } }
///
/// Records entered into the log.
///
public ulong Records { get { return st.st_record; } }
///
/// Region lock granted without wait.
///
public ulong RegionLockNoWait { get { return st.st_region_nowait; } }
///
/// Region lock granted after wait.
///
public ulong RegionLockWait { get { return st.st_region_wait; } }
///
/// Region size.
///
public ulong RegionSize { get { return (ulong)st.st_regsize.ToInt64(); } }
///
/// Total syncs to the log.
///
public ulong Syncs { get { return st.st_scount; } }
///
/// Total I/O writes to the log.
///
public ulong Writes { get { return st.st_wcount; } }
///
/// Log file version number.
///
public uint Version { get { return st.st_version; } }
}
}