summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2013-10-15 09:52:17 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2013-10-15 09:52:17 +1100
commit65b10a644f97e246ca8b5ba3fff03f1020cbcb07 (patch)
treeb14470836ded5ee0344b0900ac994add46c0a6f8 /dist
parent70a13f5990f3f04027da943db04d8a777236622b (diff)
parent2c257ae97c1d99edfb9fcc4267d055efa7dc3be3 (diff)
downloadmongo-65b10a644f97e246ca8b5ba3fff03f1020cbcb07.tar.gz
Merge branch 'develop' into lsm-bloom-newest
Conflicts: src/cursor/cur_stat.c src/include/schema.h
Diffstat (limited to 'dist')
-rw-r--r--dist/stat.py12
-rw-r--r--dist/stat_data.py2
2 files changed, 9 insertions, 5 deletions
diff --git a/dist/stat.py b/dist/stat.py
index 3c4be936aed..e6021cab18d 100644
--- a/dist/stat.py
+++ b/dist/stat.py
@@ -1,5 +1,5 @@
# Read the source files and output the statistics #defines plus the
-# initialize and clear code.
+# initialize and refresh code.
import re, string, sys, textwrap
from dist import compare_srcfile
@@ -94,6 +94,9 @@ def print_func(name, list):
void
__wt_stat_init_''' + name + '''_stats(WT_''' + name.upper() + '''_STATS *stats)
{
+\t/* Clear, so can also be called for reinitialization. */
+\tmemset(stats, 0, sizeof(*stats));
+
''')
for l in sorted(list):
o = '\tstats->' + l.name + '.desc = "' + l.desc + '";\n'
@@ -105,7 +108,7 @@ __wt_stat_init_''' + name + '''_stats(WT_''' + name.upper() + '''_STATS *stats)
f.write('''
void
-__wt_stat_clear_''' + name + '''_stats(void *stats_arg)
+__wt_stat_refresh_''' + name + '''_stats(void *stats_arg)
{
\tWT_''' + name.upper() + '''_STATS *stats;
@@ -123,7 +126,8 @@ __wt_stat_clear_''' + name + '''_stats(void *stats_arg)
f.write('''
void
-__wt_stat_aggregate_''' + name + '''_stats(void *child, void *parent)
+__wt_stat_aggregate_''' + name +
+'''_stats(const void *child, const void *parent)
{
\tWT_''' + name.upper() + '''_STATS *c, *p;
@@ -141,7 +145,7 @@ __wt_stat_aggregate_''' + name + '''_stats(void *child, void *parent)
f.write('\t' + o + '\n')
f.write('}\n')
-# Write the stat initialization and clear routines to the stat.c file.
+# Write the stat initialization and refresh routines to the stat.c file.
f = open(tmp_file, 'w')
f.write('/* DO NOT EDIT: automatically built by dist/stat.py. */\n\n')
f.write('#include "wt_internal.h"\n')
diff --git a/dist/stat_data.py b/dist/stat_data.py
index 03b07c6305f..8cd0c38bb77 100644
--- a/dist/stat_data.py
+++ b/dist/stat_data.py
@@ -7,7 +7,7 @@
# currently open'.
#
# Optional configuration flags:
-# no_clear Value ignored by the statistics clear function
+# no_clear Value ignored by the statistics refresh function
# no_aggregate Ignore the value when aggregating statistics
# max_aggregate Take the maximum value when aggregating statistics
# no_scale Don't scale value per second in the logging tool script