summaryrefslogtreecommitdiff
path: root/dist/stat.py
diff options
context:
space:
mode:
authorSusan LoVerso <sue@wiredtiger.com>2014-11-21 16:12:51 -0500
committerSusan LoVerso <sue@wiredtiger.com>2014-11-21 16:12:51 -0500
commitf6d045c32716615b16fdde893b62b8ea5cbfa949 (patch)
tree20d50288735ca5f1ea219576e5c74b47db510c57 /dist/stat.py
parentef68e3e50b40657a779c85f7465ebaf9933d7c81 (diff)
downloadmongo-f6d045c32716615b16fdde893b62b8ea5cbfa949.tar.gz
Add --all option to create an HTML file for each prefix. #1365
Diffstat (limited to 'dist/stat.py')
-rw-r--r--dist/stat.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/dist/stat.py b/dist/stat.py
index 6a3a1b74db3..6189f2374ec 100644
--- a/dist/stat.py
+++ b/dist/stat.py
@@ -161,23 +161,32 @@ compare_srcfile(tmp_file, '../src/support/stat.c')
# Update the statlog file with the entries we can scale per second.
scale_info = 'no_scale_per_second_list = [\n'
clear_info = 'no_clear_list = [\n'
+prefix_list = []
for l in sorted(connection_stats):
+ prefix_list.append(l.prefix)
if 'no_scale' in l.flags:
scale_info += ' \'' + l.desc + '\',\n'
if 'no_clear' in l.flags:
clear_info += ' \'' + l.desc + '\',\n'
for l in sorted(dsrc_stats):
+ prefix_list.append(l.prefix)
if 'no_scale' in l.flags:
scale_info += ' \'' + l.desc + '\',\n'
if 'no_clear' in l.flags:
clear_info += ' \'' + l.desc + '\',\n'
scale_info += ']\n'
clear_info += ']\n'
+prefix_info = 'prefix_list = [\n'
+# Remove the duplicates and print out the list
+for l in list(set(prefix_list)):
+ prefix_info += ' \'' + l + '\',\n'
+prefix_info += ']\n'
tmp_file = '__tmp'
f = open(tmp_file, 'w')
f.write('# DO NOT EDIT: automatically built by dist/stat.py. */\n\n')
f.write(scale_info)
f.write(clear_info)
+f.write(prefix_info)
f.close()
compare_srcfile(tmp_file, '../tools/stat_data.py')