summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSusan LoVerso <sue@wiredtiger.com>2015-02-23 10:17:36 -0500
committerSusan LoVerso <sue@wiredtiger.com>2015-02-23 10:17:36 -0500
commit0fbc70b585b96340587a16eb1058ec1600bfab81 (patch)
treef5b5ac903640ce8824e04661552d4cfe783740bc
parentf77d1487bb5d106996f03192579d3f3a2058b21e (diff)
downloadmongo-0fbc70b585b96340587a16eb1058ec1600bfab81.tar.gz
Still more stats. #1683
-rw-r--r--dist/stat_data.py2
-rw-r--r--src/include/stat.h2
-rw-r--r--src/include/wiredtiger.in114
-rw-r--r--src/log/log.c4
-rw-r--r--src/support/stat.c5
5 files changed, 72 insertions, 55 deletions
diff --git a/dist/stat_data.py b/dist/stat_data.py
index b683d922887..9d3ea41d4d7 100644
--- a/dist/stat_data.py
+++ b/dist/stat_data.py
@@ -221,6 +221,8 @@ connection_stats = [
LogStat('log_prealloc_max', 'number of pre-allocated log files to create'),
LogStat('log_prealloc_used', 'pre-allocated log files used'),
LogStat('log_reads', 'log read operations'),
+ LogStat('log_release_sync', 'log release calls with sync set'),
+ LogStat('log_release_sync_dir', 'log release calls with sync_dir set'),
LogStat('log_release_write_lsn', 'log release advances write LSN'),
LogStat('log_scan_records', 'records processed by log scan'),
LogStat('log_scan_rereads', 'log scan records requiring two reads'),
diff --git a/src/include/stat.h b/src/include/stat.h
index b1f67ad46f0..b5eeb7b3fd8 100644
--- a/src/include/stat.h
+++ b/src/include/stat.h
@@ -216,6 +216,8 @@ struct __wt_connection_stats {
WT_STATS log_prealloc_max;
WT_STATS log_prealloc_used;
WT_STATS log_reads;
+ WT_STATS log_release_sync;
+ WT_STATS log_release_sync_dir;
WT_STATS log_release_write_lsn;
WT_STATS log_scan_records;
WT_STATS log_scan_rereads;
diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in
index b444e632787..2441cf00bfb 100644
--- a/src/include/wiredtiger.in
+++ b/src/include/wiredtiger.in
@@ -3338,116 +3338,120 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_CONN_LOG_PREALLOC_USED 1082
/*! log: log read operations */
#define WT_STAT_CONN_LOG_READS 1083
+/*! log: log release calls with sync set */
+#define WT_STAT_CONN_LOG_RELEASE_SYNC 1084
+/*! log: log release calls with sync_dir set */
+#define WT_STAT_CONN_LOG_RELEASE_SYNC_DIR 1085
/*! log: log release advances write LSN */
-#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1084
+#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1086
/*! log: records processed by log scan */
-#define WT_STAT_CONN_LOG_SCAN_RECORDS 1085
+#define WT_STAT_CONN_LOG_SCAN_RECORDS 1087
/*! log: log scan records requiring two reads */
-#define WT_STAT_CONN_LOG_SCAN_REREADS 1086
+#define WT_STAT_CONN_LOG_SCAN_REREADS 1088
/*! log: log scan operations */
-#define WT_STAT_CONN_LOG_SCANS 1087
+#define WT_STAT_CONN_LOG_SCANS 1089
/*! log: consolidated slot closures */
-#define WT_STAT_CONN_LOG_SLOT_CLOSES 1088
+#define WT_STAT_CONN_LOG_SLOT_CLOSES 1090
/*! log: logging bytes consolidated */
-#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1089
+#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1091
/*! log: consolidated slot joins */
-#define WT_STAT_CONN_LOG_SLOT_JOINS 1090
+#define WT_STAT_CONN_LOG_SLOT_JOINS 1092
/*! log: consolidated slot join races */
-#define WT_STAT_CONN_LOG_SLOT_RACES 1091
+#define WT_STAT_CONN_LOG_SLOT_RACES 1093
/*! log: slots selected for switching that were unavailable */
-#define WT_STAT_CONN_LOG_SLOT_SWITCH_FAILS 1092
+#define WT_STAT_CONN_LOG_SLOT_SWITCH_FAILS 1094
/*! log: record size exceeded maximum */
-#define WT_STAT_CONN_LOG_SLOT_TOOBIG 1093
+#define WT_STAT_CONN_LOG_SLOT_TOOBIG 1095
/*! log: failed to find a slot large enough for record */
-#define WT_STAT_CONN_LOG_SLOT_TOOSMALL 1094
+#define WT_STAT_CONN_LOG_SLOT_TOOSMALL 1096
/*! log: consolidated slot join transitions */
-#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1095
+#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1097
/*! log: log sync operations */
-#define WT_STAT_CONN_LOG_SYNC 1096
+#define WT_STAT_CONN_LOG_SYNC 1098
/*! log: log sync_dir operations */
-#define WT_STAT_CONN_LOG_SYNC_DIR 1097
+#define WT_STAT_CONN_LOG_SYNC_DIR 1099
/*! log: log server thread advances write LSN */
-#define WT_STAT_CONN_LOG_WRITE_LSN 1098
+#define WT_STAT_CONN_LOG_WRITE_LSN 1100
/*! log: log write operations */
-#define WT_STAT_CONN_LOG_WRITES 1099
+#define WT_STAT_CONN_LOG_WRITES 1101
/*! LSM: sleep for LSM checkpoint throttle */
-#define WT_STAT_CONN_LSM_CHECKPOINT_THROTTLE 1100
+#define WT_STAT_CONN_LSM_CHECKPOINT_THROTTLE 1102
/*! LSM: sleep for LSM merge throttle */
-#define WT_STAT_CONN_LSM_MERGE_THROTTLE 1101
+#define WT_STAT_CONN_LSM_MERGE_THROTTLE 1103
/*! LSM: rows merged in an LSM tree */
-#define WT_STAT_CONN_LSM_ROWS_MERGED 1102
+#define WT_STAT_CONN_LSM_ROWS_MERGED 1104
/*! LSM: application work units currently queued */
-#define WT_STAT_CONN_LSM_WORK_QUEUE_APP 1103
+#define WT_STAT_CONN_LSM_WORK_QUEUE_APP 1105
/*! LSM: merge work units currently queued */
-#define WT_STAT_CONN_LSM_WORK_QUEUE_MANAGER 1104
+#define WT_STAT_CONN_LSM_WORK_QUEUE_MANAGER 1106
/*! LSM: tree queue hit maximum */
-#define WT_STAT_CONN_LSM_WORK_QUEUE_MAX 1105
+#define WT_STAT_CONN_LSM_WORK_QUEUE_MAX 1107
/*! LSM: switch work units currently queued */
-#define WT_STAT_CONN_LSM_WORK_QUEUE_SWITCH 1106
+#define WT_STAT_CONN_LSM_WORK_QUEUE_SWITCH 1108
/*! LSM: tree maintenance operations scheduled */
-#define WT_STAT_CONN_LSM_WORK_UNITS_CREATED 1107
+#define WT_STAT_CONN_LSM_WORK_UNITS_CREATED 1109
/*! LSM: tree maintenance operations discarded */
-#define WT_STAT_CONN_LSM_WORK_UNITS_DISCARDED 1108
+#define WT_STAT_CONN_LSM_WORK_UNITS_DISCARDED 1110
/*! LSM: tree maintenance operations executed */
-#define WT_STAT_CONN_LSM_WORK_UNITS_DONE 1109
+#define WT_STAT_CONN_LSM_WORK_UNITS_DONE 1111
/*! connection: memory allocations */
-#define WT_STAT_CONN_MEMORY_ALLOCATION 1110
+#define WT_STAT_CONN_MEMORY_ALLOCATION 1112
/*! connection: memory frees */
-#define WT_STAT_CONN_MEMORY_FREE 1111
+#define WT_STAT_CONN_MEMORY_FREE 1113
/*! connection: memory re-allocations */
-#define WT_STAT_CONN_MEMORY_GROW 1112
+#define WT_STAT_CONN_MEMORY_GROW 1114
/*! thread-yield: page acquire busy blocked */
-#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1113
+#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1115
/*! thread-yield: page acquire eviction blocked */
-#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1114
+#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1116
/*! thread-yield: page acquire locked blocked */
-#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1115
+#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1117
/*! thread-yield: page acquire read blocked */
-#define WT_STAT_CONN_PAGE_READ_BLOCKED 1116
+#define WT_STAT_CONN_PAGE_READ_BLOCKED 1118
/*! thread-yield: page acquire time sleeping (usecs) */
-#define WT_STAT_CONN_PAGE_SLEEP 1117
+#define WT_STAT_CONN_PAGE_SLEEP 1119
/*! connection: total read I/Os */
-#define WT_STAT_CONN_READ_IO 1118
+#define WT_STAT_CONN_READ_IO 1120
/*! reconciliation: page reconciliation calls */
-#define WT_STAT_CONN_REC_PAGES 1119
+#define WT_STAT_CONN_REC_PAGES 1121
/*! reconciliation: page reconciliation calls for eviction */
-#define WT_STAT_CONN_REC_PAGES_EVICTION 1120
+#define WT_STAT_CONN_REC_PAGES_EVICTION 1122
/*! reconciliation: split bytes currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1121
+#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1123
/*! reconciliation: split objects currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1122
+#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1124
/*! connection: pthread mutex shared lock read-lock calls */
-#define WT_STAT_CONN_RWLOCK_READ 1123
+#define WT_STAT_CONN_RWLOCK_READ 1125
/*! connection: pthread mutex shared lock write-lock calls */
-#define WT_STAT_CONN_RWLOCK_WRITE 1124
+#define WT_STAT_CONN_RWLOCK_WRITE 1126
/*! session: open cursor count */
-#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1125
+#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1127
/*! session: open session count */
-#define WT_STAT_CONN_SESSION_OPEN 1126
+#define WT_STAT_CONN_SESSION_OPEN 1128
/*! transaction: transaction begins */
-#define WT_STAT_CONN_TXN_BEGIN 1127
+#define WT_STAT_CONN_TXN_BEGIN 1129
/*! transaction: transaction checkpoints */
-#define WT_STAT_CONN_TXN_CHECKPOINT 1128
+#define WT_STAT_CONN_TXN_CHECKPOINT 1130
/*! transaction: transaction checkpoint currently running */
-#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1129
+#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1131
/*! transaction: transaction checkpoint max time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1130
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1132
/*! transaction: transaction checkpoint min time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1131
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1133
/*! transaction: transaction checkpoint most recent time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1132
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1134
/*! transaction: transaction checkpoint total time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1133
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1135
/*! transaction: transactions committed */
-#define WT_STAT_CONN_TXN_COMMIT 1134
+#define WT_STAT_CONN_TXN_COMMIT 1136
/*! transaction: transaction failures due to cache overflow */
-#define WT_STAT_CONN_TXN_FAIL_CACHE 1135
+#define WT_STAT_CONN_TXN_FAIL_CACHE 1137
/*! transaction: transaction range of IDs currently pinned */
-#define WT_STAT_CONN_TXN_PINNED_RANGE 1136
+#define WT_STAT_CONN_TXN_PINNED_RANGE 1138
/*! transaction: transactions rolled back */
-#define WT_STAT_CONN_TXN_ROLLBACK 1137
+#define WT_STAT_CONN_TXN_ROLLBACK 1139
/*! connection: total write I/Os */
-#define WT_STAT_CONN_WRITE_IO 1138
+#define WT_STAT_CONN_WRITE_IO 1140
/*!
* @}
diff --git a/src/log/log.c b/src/log/log.c
index 7b547b76262..a138ef42c86 100644
--- a/src/log/log.c
+++ b/src/log/log.c
@@ -962,6 +962,10 @@ __log_release(WT_SESSION_IMPL *session, WT_LOGSLOT *slot, int *freep)
F_CLR(slot, SLOT_CLOSEFH);
WT_ERR(__wt_cond_signal(session, conn->log_close_cond));
}
+ if (F_ISSET(slot, SLOT_SYNC))
+ WT_STAT_FAST_CONN_INCR(session, log_release_sync);
+ if (F_ISSET(slot, SLOT_SYNC_DIR))
+ WT_STAT_FAST_CONN_INCR(session, log_release_sync_dir);
/*
* Try to consolidate calls to fsync to wait less. Acquire a spin lock
diff --git a/src/support/stat.c b/src/support/stat.c
index a64dbc5f7b8..3a155688c88 100644
--- a/src/support/stat.c
+++ b/src/support/stat.c
@@ -450,6 +450,9 @@ __wt_stat_init_connection_stats(WT_CONNECTION_STATS *stats)
"log: log records too small to compress";
stats->log_release_write_lsn.desc =
"log: log release advances write LSN";
+ stats->log_release_sync.desc = "log: log release calls with sync set";
+ stats->log_release_sync_dir.desc =
+ "log: log release calls with sync_dir set";
stats->log_scans.desc = "log: log scan operations";
stats->log_scan_rereads.desc =
"log: log scan records requiring two reads";
@@ -621,6 +624,8 @@ __wt_stat_refresh_connection_stats(void *stats_arg)
stats->log_compress_write_fails.v = 0;
stats->log_compress_small.v = 0;
stats->log_release_write_lsn.v = 0;
+ stats->log_release_sync.v = 0;
+ stats->log_release_sync_dir.v = 0;
stats->log_scans.v = 0;
stats->log_scan_rereads.v = 0;
stats->log_write_lsn.v = 0;