1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002, 2014 Oracle and/or its affiliates.  All rights reserved.
5  *
6  */
7 
8 package com.sleepycat.je.rep.impl.node;
9 
10 import com.sleepycat.je.utilint.StatDefinition;
11 
12 /**
13  * Per-stat Metadata for HA Replay statistics.
14  */
15 public class ReplayStatDefinition {
16 
17     public static final String GROUP_NAME = "Replay";
18     public static final String GROUP_DESC = "The Replay unit applies the " +
19         "incoming replication stream at a Replica. These stats show the " +
20         "load the Replica incurs when processing updates.";
21 
22     public static StatDefinition N_COMMITS =
23         new StatDefinition("nCommits",
24                            "Number of Commits replayed by the Replica.");
25 
26     public static StatDefinition N_GROUP_COMMIT_TIMEOUTS =
27         new StatDefinition("nGroupCommitTimeouts",
28                            "Number of group commits that were initiated due " +
29                            "to the group timeout interval" +
30                            "(ReplicationConfig.REPLICA_GROUP_COMMIT_INTERVAL)" +
31                            " being exceeded.");
32 
33     public static StatDefinition N_GROUP_COMMIT_MAX_EXCEEDED =
34         new StatDefinition("nGroupCommitMaxExceeded",
35                            "Number of group commits that were initiated due " +
36                            "to the max group size" +
37                            "(ReplicationConfig.REPLICA_MAX_GROUP_COMMIT) " +
38                            " being exceeded.");
39 
40     public static StatDefinition N_GROUP_COMMIT_TXNS =
41         new StatDefinition("nGroupCommitTxns",
42                            "Number of replay transaction commits that were " +
43                            "part of a group commit operation.");
44 
45     public static StatDefinition N_GROUP_COMMITS =
46         new StatDefinition("nGroupCommits",
47                            "Number of group commit operations.");
48 
49     public static StatDefinition N_COMMIT_ACKS =
50         new StatDefinition("nCommitAcks",
51                            "Number of commits for which the Master " +
52                            "requested an ack.");
53 
54     public static StatDefinition N_COMMIT_SYNCS =
55         new StatDefinition("nCommitSyncs",
56                            "Number of CommitSyncs used to satisfy " +
57                            "ack requests. " +
58                            "Note that user level commit sync requests " +
59                            "may be optimized into CommitNoSync requests " +
60                            "as part of a group commit.");
61 
62     public static StatDefinition N_COMMIT_NO_SYNCS =
63         new StatDefinition("nCommitNoSyncs",
64                            "Number of CommitNoSyncs used to satisfy " +
65                            "ack requests.");
66 
67     public static StatDefinition N_COMMIT_WRITE_NO_SYNCS =
68         new StatDefinition("nCommitWriteNoSyncs",
69                            "Number of CommitWriteNoSyncs used to satisfy " +
70                            "ack requests.");
71 
72     public static StatDefinition N_ABORTS =
73         new StatDefinition("nAborts",
74                            "Number of Aborts replayed by the Replica.");
75 
76     public static StatDefinition N_LNS =
77         new StatDefinition("nLNs", "Number of LNs.");
78 
79     public static StatDefinition N_NAME_LNS =
80         new StatDefinition("nNameLNs", "Number of Name LNs.");
81 
82     public static StatDefinition N_ELAPSED_TXN_TIME =
83         new StatDefinition("nElapsedTxnTime",
84                            "The elapsed time in ms, spent" +
85                            " replaying all transactions.");
86 
87     public static StatDefinition N_MESSAGE_QUEUE_OVERFLOWS =
88             new StatDefinition("nMessageQueueOverflows",
89                                "Number of failed attempts to place an " +
90                                "entry in the replica message queue " +
91                                "due to the queue being full.");
92 
93     public static StatDefinition MIN_COMMIT_PROCESSING_NANOS =
94         new StatDefinition("minCommitProcessingNanos",
95                            "Minimum nanosecs for commit processing");
96 
97     public static StatDefinition MAX_COMMIT_PROCESSING_NANOS =
98         new StatDefinition("maxCommitProcessingNanos",
99                            "Maximum nanosecs for commit processing");
100 
101     public static StatDefinition TOTAL_COMMIT_PROCESSING_NANOS =
102         new StatDefinition("totalCommitProcessingNanos",
103                            "Total nanosecs for commit processing");
104 
105     public static final StatDefinition TOTAL_COMMIT_LAG_MS =
106         new StatDefinition(
107             "totalCommitLagMs",
108             "Sum of time periods, in msec, between when update operations" +
109             " commit on the master and then subsequently commit on the" +
110             " replica. This value is affected by any clock skew between the" +
111             " master and the replica.");
112 
113     public static final StatDefinition LATEST_COMMIT_LAG_MS =
114         new StatDefinition(
115             "latestCommitLagMs",
116             "Time in msec between when the latest update operation" +
117             " committed on the master and then subsequently committed on the" +
118             " replica. This value is affected by any clock skew between the" +
119             " master and the replica.");
120 }
121