]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
figleaf output: include a stats.out for parsing by a munin plugin
authorBrian Warner <warner@allmydata.com>
Sat, 7 Apr 2007 00:41:01 +0000 (17:41 -0700)
committerBrian Warner <warner@allmydata.com>
Sat, 7 Apr 2007 00:41:01 +0000 (17:41 -0700)
src/allmydata/util/figleaf_htmlizer.py

index 3e0c263ccd76c2baf85b68cbde0c07693a381f86..9b009373b0a722c040237a688b8e28d39f8b5a10 100644 (file)
@@ -144,6 +144,13 @@ def report_as_html(coverage, directory, exclude_patterns=[], root=None):
        pcnt_75 = [ x for x in pcnts if x >= 75 ]
        pcnt_50 = [ x for x in pcnts if x >= 50 ]
 
+        stats_fp = open('%s/stats.out' % (directory,), 'w')
+        stats_fp.write("total files: %d\n" % len(pcnts))
+        stats_fp.write("total source lines: %d\n" % summary_lines)
+        stats_fp.write("total covered lines: %d\n" % summary_cover)
+        stats_fp.write("total coverage percentage: %.1f\n" % summary_pcnt)
+        stats_fp.close()
+
         ## index.html
        index_fp = open('%s/index.html' % (directory,), 'w')
         # summary info