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 a file in the memory pool
14    /// </summary>
15    public class MPoolFileStats {
16        private Internal.MPoolFileStatStruct st;
17        internal MPoolFileStats(Internal.MPoolFileStatStruct stats) {
18            st = stats;
19        }
20
21        /// <summary>
22        /// File name.
23        /// </summary>
24        public string FileName { get { return st.file_name; } }
25        /// <summary>
26        /// Pages from mapped files.
27        /// </summary>
28        public uint MappedPages { get { return st.st_map; } }
29        /// <summary>
30        /// Pages created in the cache.
31        /// </summary>
32        public ulong PagesCreatedInCache { get { return st.st_page_create; } }
33        /// <summary>
34        /// Pages found in the cache.
35        /// </summary>
36        public ulong PagesInCache { get { return st.st_cache_hit; } }
37        /// <summary>
38        /// Pages not found in the cache.
39        /// </summary>
40        public ulong PagesNotInCache { get { return st.st_cache_miss; } }
41        /// <summary>
42        /// Pages read in.
43        /// </summary>
44        public ulong PagesRead { get { return st.st_page_in; } }
45        /// <summary>
46        /// Page size.
47        /// </summary>
48        public uint PageSize { get { return st.st_pagesize; } }
49        /// <summary>
50        /// Pages written out.
51        /// </summary>
52        public ulong PagesWritten { get { return st.st_page_out; } }
53    }
54}