blob: 32a6ae2b7b6f60c6aa1756eb5644b01862a3090e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2009 Oracle. All rights reserved.
*
*/
using System;
using System.Collections.Generic;
using System.Text;
using BerkeleyDB.Internal;
namespace BerkeleyDB {
/// <summary>
/// A class for representing compact operation statistics
/// </summary>
public class CompactData {
private DB_COMPACT cdata;
private DatabaseEntry _end;
internal CompactData(DB_COMPACT dbcompact, DatabaseEntry end) {
cdata = dbcompact;
_end = end;
}
/// <summary>
/// If no <see cref="Transaction"/> parameter was specified, the
/// number of deadlocks which occurred.
/// </summary>
public uint Deadlocks {
get { return cdata.compact_deadlock; }
}
/// <summary>
/// The number of levels removed from the Btree or Recno database during
/// the compaction phase.
/// </summary>
public uint Levels {
get { return cdata.compact_levels; }
}
/// <summary>
/// The number of database pages reviewed during the compaction phase.
/// </summary>
public uint PagesExamined {
get { return cdata.compact_pages_examine; }
}
/// <summary>
/// The number of database pages freed during the compaction phase.
/// </summary>
public uint PagesFreed {
get { return cdata.compact_pages_free; }
}
/// <summary>
/// The number of database pages returned to the filesystem.
/// </summary>
public uint PagesTruncated {
get { return cdata.compact_pages_truncated; }
}
/// <summary>
/// The database key marking the end of the compaction operation. This
/// is generally the first key of the page where the operation stopped
/// and is only non-null if <see cref="CompactConfig.returnEnd"/> was
/// true.
/// </summary>
public DatabaseEntry End {
get { return _end; }
}
}
}
|