/*- * 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 HashDatabase /// public class HashStats { private Internal.HashStatStruct st; internal HashStats(Internal.HashStatStruct stats) { st = stats; } /// /// Number of big key/data pages. /// public uint BigPages { get { return st.hash_bigpages; } } /// /// Bytes free on big item pages. /// public ulong BigPagesFreeBytes { get { return st.hash_big_bfree; } } /// /// Bytes free on bucket pages. /// public ulong BucketPagesFreeBytes { get { return st.hash_bfree; } } /// /// Number of dup pages. /// public uint DuplicatePages { get { return st.hash_dup; } } /// /// Bytes free on duplicate pages. /// public ulong DuplicatePagesFreeBytes { get { return st.hash_dup_free; } } /// /// Fill factor specified at create. /// public uint FillFactor { get { return st.hash_ffactor; } } /// /// Pages on the free list. /// public uint FreePages { get { return st.hash_free; } } /// /// Metadata flags. /// public uint MetadataFlags { get { return st.hash_metaflags; } } /// /// Magic number. /// public uint MagicNumber { get { return st.hash_magic; } } /// /// Number of data items. /// public uint nData { get { return st.hash_ndata; } } /// /// Number of hash buckets. /// public uint nHashBuckets { get { return st.hash_buckets; } } /// /// Number of unique keys. /// public uint nKeys { get { return st.hash_nkeys; } } /// /// Number of overflow pages. /// public uint OverflowPages { get { return st.hash_overflows; } } /// /// Bytes free on ovfl pages. /// public ulong OverflowPagesFreeBytes { get { return st.hash_ovfl_free; } } /// /// Page count. /// public uint nPages { get { return st.hash_pagecnt; } } /// /// Page size. /// public uint PageSize { get { return st.hash_pagesize; } } /// /// Version number. /// public uint Version { get { return st.hash_version; } } } }