/*-
* 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 a RecnoDatabase
///
public class RecnoStats {
private Internal.BTreeStatStruct st;
internal RecnoStats(Internal.BTreeStatStruct stats) {
st = stats;
}
///
/// Magic number.
///
public uint MagicNumber { get { return st.bt_magic; } }
///
/// Version number.
///
public uint Version { get { return st.bt_version; } }
///
/// Metadata flags.
///
public uint MetadataFlags { get { return st.bt_metaflags; } }
///
/// Number of unique keys.
///
public uint nKeys { get { return st.bt_nkeys; } }
///
/// Number of data items.
///
public uint nData { get { return st.bt_ndata; } }
///
/// Page count.
///
public uint nPages { get { return st.bt_pagecnt; } }
///
/// Page size.
///
public uint PageSize { get { return st.bt_pagesize; } }
///
/// Minkey value.
///
public uint MinKey { get { return st.bt_minkey; } }
///
/// Fixed-length record length.
///
public uint RecordLength { get { return st.bt_re_len; } }
///
/// Fixed-length record pad.
///
public uint RecordPadByte { get { return st.bt_re_pad; } }
///
/// Tree levels.
///
public uint Levels { get { return st.bt_levels; } }
///
/// Internal pages.
///
public uint InternalPages { get { return st.bt_int_pg; } }
///
/// Leaf pages.
///
public uint LeafPages { get { return st.bt_leaf_pg; } }
///
/// Duplicate pages.
///
public uint DuplicatePages { get { return st.bt_dup_pg; } }
///
/// Overflow pages.
///
public uint OverflowPages { get { return st.bt_over_pg; } }
///
/// Empty pages.
///
public uint EmptyPages { get { return st.bt_empty_pg; } }
///
/// Pages on the free list.
///
public uint FreePages { get { return st.bt_free; } }
///
/// Bytes free in internal pages.
///
public ulong InternalPagesFreeBytes { get { return st.bt_int_pgfree; } }
///
/// Bytes free in leaf pages.
///
public ulong LeafPagesFreeBytes { get { return st.bt_leaf_pgfree; } }
///
/// Bytes free in duplicate pages.
///
public ulong DuplicatePagesFreeBytes { get { return st.bt_dup_pgfree; } }
///
/// Bytes free in overflow pages.
///
public ulong OverflowPagesFreeBytes { get { return st.bt_over_pgfree; } }
}
}