summaryrefslogtreecommitdiff
path: root/dist/stat.py
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2013-12-04 15:25:55 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2013-12-04 15:25:55 +1100
commit75efa8deb1fd3678b8e0ad1c089950d67e0e906e (patch)
treea4346205dee0c7daf0fccb761b7a684a05669ef1 /dist/stat.py
parente3a1d66100708373985ffb899ef99bfa850bcfa5 (diff)
downloadmongo-75efa8deb1fd3678b8e0ad1c089950d67e0e906e.tar.gz
Add an alternative script to turn statistics logs into graphs using D3.
This is just a starting point, but I'm finding it useful and I don't want to lose it. Rework the auto-generated list of unscaled statistics so it can be used from multiple scripts.
Diffstat (limited to 'dist/stat.py')
-rw-r--r--dist/stat.py19
1 files changed, 5 insertions, 14 deletions
diff --git a/dist/stat.py b/dist/stat.py
index 69dcb87e8b3..d800925dbde 100644
--- a/dist/stat.py
+++ b/dist/stat.py
@@ -169,17 +169,8 @@ for l in sorted(dsrc_stats):
scale_info += ']\n'
tmp_file = '__tmp'
-tfile = open(tmp_file, 'w')
-skip = 0
-for line in open('../tools/statlog.py', 'r'):
- if skip:
- if line.count('no scale-per-second list section: END'):
- tfile.write(line)
- skip = 0
- else:
- tfile.write(line)
- if line.count('no scale-per-second list section: BEGIN'):
- skip = 1
- tfile.write(scale_info)
-tfile.close()
-compare_srcfile(tmp_file, '../tools/statlog.py')
+f = open(tmp_file, 'w')
+f.write('# DO NOT EDIT: automatically built by dist/stat.py. */\n\n')
+f.write(scale_info)
+f.close()
+compare_srcfile(tmp_file, '../tools/stat_data.py')