summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSulabh Mahajan <sulabh.mahajan@mongodb.com>2016-06-10 21:23:22 +1000
committersueloverso <sue@mongodb.com>2016-06-10 07:23:22 -0400
commit398b1da2eabe604f0d9d3d4bb1a058b7d260af1e (patch)
tree1d23da44363656fc51e93fd49bbbfb4977af2bb5
parent3ed78d64fa38162bfe7a8e294403460e848db48d (diff)
downloadmongo-398b1da2eabe604f0d9d3d4bb1a058b7d260af1e.tar.gz
WT-2319 Add units to stats descriptions, change variable names (#2795)
-rw-r--r--dist/stat_data.py8
-rw-r--r--src/include/stat.h8
-rw-r--r--src/include/wiredtiger.in12
-rw-r--r--src/support/stat.c26
-rw-r--r--src/txn/txn_ckpt.c8
5 files changed, 32 insertions, 30 deletions
diff --git a/dist/stat_data.py b/dist/stat_data.py
index c1862779946..6022ae3fee2 100644
--- a/dist/stat_data.py
+++ b/dist/stat_data.py
@@ -272,6 +272,10 @@ connection_stats = [
##########################################
TxnStat('txn_begin', 'transaction begins'),
TxnStat('txn_checkpoint', 'transaction checkpoints'),
+ TxnStat('txn_checkpoint_fsync_post', 'transaction fsync calls for checkpoint after allocating the transaction ID'),
+ TxnStat('txn_checkpoint_fsync_post_duration', 'transaction fsync duration for checkpoint after allocating the transaction ID (usecs)'),
+ TxnStat('txn_checkpoint_fsync_pre', 'transaction fsync calls for checkpoint before allocating the transaction ID'),
+ TxnStat('txn_checkpoint_fsync_pre_duration', 'transaction fsync duration for checkpoint before allocating the transaction ID (usecs)'),
TxnStat('txn_checkpoint_generation', 'transaction checkpoint generation', 'no_clear,no_scale'),
TxnStat('txn_checkpoint_running', 'transaction checkpoint currently running', 'no_clear,no_scale'),
TxnStat('txn_checkpoint_time_max', 'transaction checkpoint max time (msecs)', 'no_clear,no_scale'),
@@ -280,10 +284,6 @@ connection_stats = [
TxnStat('txn_checkpoint_time_total', 'transaction checkpoint total time (msecs)', 'no_clear,no_scale'),
TxnStat('txn_commit', 'transactions committed'),
TxnStat('txn_fail_cache', 'transaction failures due to cache overflow'),
- TxnStat('txn_fsync_post', 'transaction fsync calls for checkpoint after allocating the transaction ID'),
- TxnStat('txn_fsync_post_duration', 'transaction fsync duration for checkpoint after allocating the transaction ID'),
- TxnStat('txn_fsync_pre', 'transaction fsync calls for checkpoint before allocating the transaction ID'),
- TxnStat('txn_fsync_pre_duration', 'transaction fsync duration for checkpoint before allocating the transaction ID'),
TxnStat('txn_pinned_checkpoint_range', 'transaction range of IDs currently pinned by a checkpoint', 'no_clear,no_scale'),
TxnStat('txn_pinned_range', 'transaction range of IDs currently pinned', 'no_clear,no_scale'),
TxnStat('txn_pinned_snapshot_range', 'transaction range of IDs currently pinned by named snapshots', 'no_clear,no_scale'),
diff --git a/src/include/stat.h b/src/include/stat.h
index 3af63b5b2d7..e921d64a0c5 100644
--- a/src/include/stat.h
+++ b/src/include/stat.h
@@ -399,10 +399,10 @@ struct __wt_connection_stats {
int64_t txn_checkpoint_time_total;
int64_t txn_checkpoint;
int64_t txn_fail_cache;
- int64_t txn_fsync_post;
- int64_t txn_fsync_pre;
- int64_t txn_fsync_post_duration;
- int64_t txn_fsync_pre_duration;
+ int64_t txn_checkpoint_fsync_post;
+ int64_t txn_checkpoint_fsync_pre;
+ int64_t txn_checkpoint_fsync_post_duration;
+ int64_t txn_checkpoint_fsync_pre_duration;
int64_t txn_pinned_range;
int64_t txn_pinned_checkpoint_range;
int64_t txn_pinned_snapshot_range;
diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in
index 4168b3d070a..77752d7a7b4 100644
--- a/src/include/wiredtiger.in
+++ b/src/include/wiredtiger.in
@@ -4551,16 +4551,16 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_CONN_TXN_FAIL_CACHE 1171
/*! transaction: transaction fsync calls for checkpoint after allocating
* the transaction ID */
-#define WT_STAT_CONN_TXN_FSYNC_POST 1172
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1172
/*! transaction: transaction fsync calls for checkpoint before allocating
* the transaction ID */
-#define WT_STAT_CONN_TXN_FSYNC_PRE 1173
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_PRE 1173
/*! transaction: transaction fsync duration for checkpoint after
- * allocating the transaction ID */
-#define WT_STAT_CONN_TXN_FSYNC_POST_DURATION 1174
+ * allocating the transaction ID (usecs) */
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1174
/*! transaction: transaction fsync duration for checkpoint before
- * allocating the transaction ID */
-#define WT_STAT_CONN_TXN_FSYNC_PRE_DURATION 1175
+ * allocating the transaction ID (usecs) */
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_PRE_DURATION 1175
/*! transaction: transaction range of IDs currently pinned */
#define WT_STAT_CONN_TXN_PINNED_RANGE 1176
/*! transaction: transaction range of IDs currently pinned by a checkpoint */
diff --git a/src/support/stat.c b/src/support/stat.c
index c1ee6cc2031..0f555a77ccb 100644
--- a/src/support/stat.c
+++ b/src/support/stat.c
@@ -688,8 +688,8 @@ static const char * const __stats_connection_desc[] = {
"transaction: transaction failures due to cache overflow",
"transaction: transaction fsync calls for checkpoint after allocating the transaction ID",
"transaction: transaction fsync calls for checkpoint before allocating the transaction ID",
- "transaction: transaction fsync duration for checkpoint after allocating the transaction ID",
- "transaction: transaction fsync duration for checkpoint before allocating the transaction ID",
+ "transaction: transaction fsync duration for checkpoint after allocating the transaction ID (usecs)",
+ "transaction: transaction fsync duration for checkpoint before allocating the transaction ID (usecs)",
"transaction: transaction range of IDs currently pinned",
"transaction: transaction range of IDs currently pinned by a checkpoint",
"transaction: transaction range of IDs currently pinned by named snapshots",
@@ -898,10 +898,10 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats)
/* not clearing txn_checkpoint_time_total */
stats->txn_checkpoint = 0;
stats->txn_fail_cache = 0;
- stats->txn_fsync_post = 0;
- stats->txn_fsync_pre = 0;
- stats->txn_fsync_post_duration = 0;
- stats->txn_fsync_pre_duration = 0;
+ stats->txn_checkpoint_fsync_post = 0;
+ stats->txn_checkpoint_fsync_pre = 0;
+ stats->txn_checkpoint_fsync_post_duration = 0;
+ stats->txn_checkpoint_fsync_pre_duration = 0;
/* not clearing txn_pinned_range */
/* not clearing txn_pinned_checkpoint_range */
/* not clearing txn_pinned_snapshot_range */
@@ -1143,12 +1143,14 @@ __wt_stat_connection_aggregate(
WT_STAT_READ(from, txn_checkpoint_time_total);
to->txn_checkpoint += WT_STAT_READ(from, txn_checkpoint);
to->txn_fail_cache += WT_STAT_READ(from, txn_fail_cache);
- to->txn_fsync_post += WT_STAT_READ(from, txn_fsync_post);
- to->txn_fsync_pre += WT_STAT_READ(from, txn_fsync_pre);
- to->txn_fsync_post_duration +=
- WT_STAT_READ(from, txn_fsync_post_duration);
- to->txn_fsync_pre_duration +=
- WT_STAT_READ(from, txn_fsync_pre_duration);
+ to->txn_checkpoint_fsync_post +=
+ WT_STAT_READ(from, txn_checkpoint_fsync_post);
+ to->txn_checkpoint_fsync_pre +=
+ WT_STAT_READ(from, txn_checkpoint_fsync_pre);
+ to->txn_checkpoint_fsync_post_duration +=
+ WT_STAT_READ(from, txn_checkpoint_fsync_post_duration);
+ to->txn_checkpoint_fsync_pre_duration +=
+ WT_STAT_READ(from, txn_checkpoint_fsync_pre_duration);
to->txn_pinned_range += WT_STAT_READ(from, txn_pinned_range);
to->txn_pinned_checkpoint_range +=
WT_STAT_READ(from, txn_pinned_checkpoint_range);
diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c
index 2930856fd7c..7061582b2a8 100644
--- a/src/txn/txn_ckpt.c
+++ b/src/txn/txn_ckpt.c
@@ -430,9 +430,9 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
WT_ERR(__checkpoint_apply(session, cfg, __wt_checkpoint_sync));
WT_ERR(__wt_epoch(session, &fsync_stop));
fsync_duration_usecs = WT_TIMEDIFF_US(fsync_stop, fsync_start);
- WT_STAT_FAST_CONN_INCR(session, txn_fsync_pre);
+ WT_STAT_FAST_CONN_INCR(session, txn_checkpoint_fsync_pre);
WT_STAT_FAST_CONN_INCRV(session,
- txn_fsync_pre_duration, fsync_duration_usecs);
+ txn_checkpoint_fsync_pre_duration, fsync_duration_usecs);
/* Tell logging that we are about to start a database checkpoint. */
if (full && logging)
@@ -535,9 +535,9 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
WT_ERR(__checkpoint_apply(session, cfg, __wt_checkpoint_sync));
WT_ERR(__wt_epoch(session, &fsync_stop));
fsync_duration_usecs = WT_TIMEDIFF_US(fsync_stop, fsync_start);
- WT_STAT_FAST_CONN_INCR(session, txn_fsync_post);
+ WT_STAT_FAST_CONN_INCR(session, txn_checkpoint_fsync_post);
WT_STAT_FAST_CONN_INCRV(session,
- txn_fsync_post_duration, fsync_duration_usecs);
+ txn_checkpoint_fsync_post_duration, fsync_duration_usecs);
WT_ERR(__checkpoint_verbose_track(session,
"sync completed", &verb_timer));