summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-03-21 21:24:11 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-03-21 21:24:11 -0400
commitc0bd7211a58a964de9e76229ef7413762dbc38dc (patch)
tree09ece9da719f407715b0bec28f632e0000bb22cd
parent4756df0f9095b2613c7ecb95ad9ecbc25d43ea7c (diff)
downloadmongo-c0bd7211a58a964de9e76229ef7413762dbc38dc.tar.gz
Replace statistics_log.objects with statistics_log.sources, no other change.
-rw-r--r--dist/api_data.py11
-rw-r--r--examples/c/ex_all.c2
-rw-r--r--src/config/config_def.c8
-rw-r--r--src/conn/conn_stat.c18
-rw-r--r--src/include/connection.h2
-rw-r--r--src/include/wiredtiger.in28
-rw-r--r--test/format/wts.c2
7 files changed, 36 insertions, 35 deletions
diff --git a/dist/api_data.py b/dist/api_data.py
index de2655492f6..163e2629c93 100644
--- a/dist/api_data.py
+++ b/dist/api_data.py
@@ -578,16 +578,17 @@ methods = {
Config('clear', 'true', r'''
reset statistics counters after each set of log records are
written''', type='boolean'),
- Config('objects', '', r'''
- if non-empty, include statistics for the list of objects. No
- statistics that require traversing a tree are reported, as if
- the \c statistics_fast configuration string were set''',
- type='list'),
Config('path', '"WiredTigerStat.%H"', r'''
the pathname to a file into which the log records are written,
may contain strftime conversion specifications. If the value
is not an absolute path name, the file is created relative to
the database home'''),
+ Config('sources', '', r'''
+ if non-empty, include statistics for the list of data source
+ URIs. No statistics that require traversing a tree are
+ reported, as if the \c statistics_fast configuration string
+ were set''',
+ type='list'),
Config('timestamp', '"%b %d %H:%M:%S"', r'''
a timestamp prepended to each log record, may contain strftime
conversion specifications'''),
diff --git a/examples/c/ex_all.c b/examples/c/ex_all.c
index 69f9c8ca27a..540fc973c04 100644
--- a/examples/c/ex_all.c
+++ b/examples/c/ex_all.c
@@ -1116,7 +1116,7 @@ main(void)
/*! [Statistics logging with objects] */
ret = wiredtiger_open(home, NULL,
"create,"
- "statistics_log=(objects=(\"table:table1\",\"table:table2\"))",
+ "statistics_log=(sources=(\"table:table1\",\"table:table2\"))",
&conn);
/*! [Statistics logging with objects] */
if (ret == 0)
diff --git a/src/config/config_def.c b/src/config/config_def.c
index 7a863e1bc54..d99ac800bbb 100644
--- a/src/config/config_def.c
+++ b/src/config/config_def.c
@@ -424,9 +424,9 @@ __wt_confdfl_wiredtiger_open =
",eviction_trigger=95,extensions=,hazard_max=1000,logging=0,"
"lsm_merge=,mmap=,multiprocess=0,session_max=50,"
"shared_cache=(chunk=10MB,name=pool,reserve=0,size=500MB),"
- "statistics=0,statistics_log=(clear=,objects=,"
- "path=\"WiredTigerStat.%H\",timestamp=\"%b %d %H:%M:%S\",wait=0),"
- "sync=,transactional=,use_environment_priv=0,verbose=";
+ "statistics=0,statistics_log=(clear=,path=\"WiredTigerStat.%H\","
+ "sources=,timestamp=\"%b %d %H:%M:%S\",wait=0),sync=,transactional=,"
+ "use_environment_priv=0,verbose=";
WT_CONFIG_CHECK
__wt_confchk_checkpoint_subconfigs[] = {
@@ -438,8 +438,8 @@ __wt_confchk_checkpoint_subconfigs[] = {
WT_CONFIG_CHECK
__wt_confchk_statistics_log_subconfigs[] = {
{ "clear", "boolean", NULL, NULL },
- { "objects", "list", NULL, NULL },
{ "path", "string", NULL, NULL },
+ { "sources", "list", NULL, NULL },
{ "timestamp", "string", NULL, NULL },
{ "wait", "int", "min=5,max=100000", NULL },
{ NULL, NULL, NULL, NULL }
diff --git a/src/conn/conn_stat.c b/src/conn/conn_stat.c
index 85fa076d86e..0660ab2435c 100644
--- a/src/conn/conn_stat.c
+++ b/src/conn/conn_stat.c
@@ -60,14 +60,14 @@ __statlog_config(WT_SESSION_IMPL *session, const char **cfg, int *runp)
WT_RET(__wt_config_gets(session, cfg, "statistics_log.clear", &cval));
conn->stat_clear = cval.val != 0;
- WT_RET(__wt_config_gets(session, cfg, "statistics_log.objects", &cval));
+ WT_RET(__wt_config_gets(session, cfg, "statistics_log.sources", &cval));
WT_RET(__wt_config_subinit(session, &objectconf, &cval));
for (cnt = 0; (ret = __wt_config_next(&objectconf, &k, &v)) == 0; ++cnt)
;
WT_RET_NOTFOUND_OK(ret);
if (cnt != 0) {
WT_RET(
- __wt_calloc_def(session, cnt * 2 + 1, &conn->stat_objects));
+ __wt_calloc_def(session, cnt * 2 + 1, &conn->stat_sources));
WT_RET(__wt_config_subinit(session, &objectconf, &cval));
for (cnt = 0;
(ret = __wt_config_next(&objectconf, &k, &v)) == 0;) {
@@ -81,14 +81,14 @@ __statlog_config(WT_SESSION_IMPL *session, const char **cfg, int *runp)
* the enhanced uri used to open the statistics cursor.
*/
WT_RET(__wt_strndup(session,
- k.str, k.len, &conn->stat_objects[cnt]));
+ k.str, k.len, &conn->stat_sources[cnt]));
++cnt;
WT_RET(__wt_calloc_def(session,
strlen("statistics:") + k.len + 1,
- &conn->stat_objects[cnt]));
- strcpy(conn->stat_objects[cnt], "statistics:");
- strncat(conn->stat_objects[cnt], k.str, k.len);
+ &conn->stat_sources[cnt]));
+ strcpy(conn->stat_sources[cnt], "statistics:");
+ strncat(conn->stat_sources[cnt], k.str, k.len);
++cnt;
}
WT_RET_NOTFOUND_OK(ret);
@@ -231,7 +231,7 @@ __stat_server(void *arg)
session, conn->home, "statistics:", tmp.mem, fp));
/* Dump the object list statistics. */
- if ((p = conn->stat_objects) != NULL)
+ if ((p = conn->stat_sources) != NULL)
for (; *p != NULL; p += 2)
WT_ERR(__stat_server_dump(
session, p[0], p[1], tmp.mem, fp));
@@ -319,10 +319,10 @@ __wt_statlog_destroy(WT_CONNECTION_IMPL *conn)
if (conn->stat_cond != NULL)
WT_TRET(__wt_cond_destroy(session, conn->stat_cond));
- if ((p = conn->stat_objects) != NULL) {
+ if ((p = conn->stat_sources) != NULL) {
for (; *p != NULL; ++p)
__wt_free(session, *p);
- __wt_free(session, conn->stat_objects);
+ __wt_free(session, conn->stat_sources);
}
__wt_free(session, conn->stat_path);
__wt_free(session, conn->stat_stamp);
diff --git a/src/include/connection.h b/src/include/connection.h
index 44bce3c2a17..67b87a1d606 100644
--- a/src/include/connection.h
+++ b/src/include/connection.h
@@ -148,8 +148,8 @@ struct __wt_connection_impl {
int stat_tid_set; /* Statistics log thread set */
WT_CONDVAR *stat_cond; /* Statistics log wait mutex */
int stat_clear; /* Statistics log clear */
- char **stat_objects; /* Statistics list of objects */
const char *stat_path; /* Statistics log path format */
+ char **stat_sources; /* Statistics log list of objects */
const char *stat_stamp; /* Statistics log timestamp format */
long stat_usecs; /* Statistics log period */
diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in
index 209185f21e5..d61871af60a 100644
--- a/src/include/wiredtiger.in
+++ b/src/include/wiredtiger.in
@@ -1305,20 +1305,20 @@ struct __wt_connection {
* statistics_log for more information.,a set of related configuration options
* defined below.}@config{&nbsp;&nbsp;&nbsp;&nbsp;clear, reset statistics
* counters after each set of log records are written.,a boolean flag; default
- * \c true.}@config{&nbsp;&nbsp;&nbsp;&nbsp;objects, if non-empty\, include
- * statistics for the list of objects. No statistics that require traversing a
- * tree are reported\, as if the \c statistics_fast configuration string were
- * set.,a list of strings; default empty.}@config{&nbsp;&nbsp;&nbsp;&nbsp;path,
- * the pathname to a file into which the log records are written\, may contain
- * strftime conversion specifications. If the value is not an absolute path
- * name\, the file is created relative to the database home.,a string; default
- * \c "WiredTigerStat.%H".}@config{&nbsp;&nbsp;&nbsp;&nbsp;timestamp, a
- * timestamp prepended to each log record\, may contain strftime conversion
- * specifications.,a string; default \c "%b %d
- * %H:%M:%S".}@config{&nbsp;&nbsp;&nbsp;&nbsp;wait, seconds to wait between each
- * write of the log records; setting this value configures \c statistics and
- * statistics logging.,an integer between 5 and 100000; default \c 0.}@config{
- * ),,}
+ * \c true.}@config{&nbsp;&nbsp;&nbsp;&nbsp;path, the pathname to a file into
+ * which the log records are written\, may contain strftime conversion
+ * specifications. If the value is not an absolute path name\, the file is
+ * created relative to the database home.,a string; default \c
+ * "WiredTigerStat.%H".}@config{&nbsp;&nbsp;&nbsp;&nbsp;sources, if non-empty\,
+ * include statistics for the list of data source URIs. No statistics that
+ * require traversing a tree are reported\, as if the \c statistics_fast
+ * configuration string were set.,a list of strings; default
+ * empty.}@config{&nbsp;&nbsp;&nbsp;&nbsp;timestamp, a timestamp prepended to
+ * each log record\, may contain strftime conversion specifications.,a string;
+ * default \c "%b %d %H:%M:%S".}@config{&nbsp;&nbsp;&nbsp;&nbsp;wait, seconds to
+ * wait between each write of the log records; setting this value configures \c
+ * statistics and statistics logging.,an integer between 5 and 100000; default
+ * \c 0.}@config{ ),,}
* @config{sync, flush files to stable storage when closing or writing
* checkpoints.,a boolean flag; default \c true.}
* @config{transactional, support transactional semantics.,a boolean flag;
diff --git a/test/format/wts.c b/test/format/wts.c
index 31a8f1b5e85..8c1f02a3ebe 100644
--- a/test/format/wts.c
+++ b/test/format/wts.c
@@ -78,7 +78,7 @@ wts_open(void)
"create,cache_size=%" PRIu32 "MB,"
"error_prefix=\"%s\","
"extensions=[\"%s\", \"%s\", \"%s\", \"%s\", \"%s\"],%s,%s,"
- "statistics=true,statistics_log=(objects=(\"%s\"),wait=5),"
+ "statistics=true,statistics_log=(sources=(\"%s\"),wait=5),"
"sync=false,",
g.c_cache,
g.progname,