Browse Source

minor bug fixing and improvements. new format for info tool.

avkonst 11 years ago
parent
commit
d14be48619
27 changed files with 118 additions and 94 deletions
  1. 1 1
      mainline/ext/std/tools/export.ini
  2. 11 11
      mainline/ext/std/tools/info.py
  3. 29 7
      mainline/ext/std/tools/view.py
  4. 1 3
      mainline/mpp/api.py
  5. 4 1
      mainline/mpp/internal/dbwrap.py
  6. 2 2
      mainline/tests/general/test_basic.py
  7. 0 1
      mainline/tests/general/test_basic/test_help_--help_default_stdout.gold.txt
  8. 3 3
      mainline/tests/general/test_basic/test_std_general_metrics_view_nest_per_file_stdout.gold.txt
  9. 3 3
      mainline/tests/general/test_basic/test_std_general_metrics_view_txt_stdout.gold.txt
  10. 4 4
      mainline/tests/general/test_basic/test_std_lines_metrics_view_nest_per_file_stdout.gold.txt
  11. 4 4
      mainline/tests/general/test_basic/test_std_lines_metrics_view_txt_stdout.gold.txt
  12. 2 2
      mainline/tests/general/test_basic/test_view_format_view_nest_per_file_stdout.gold.txt
  13. 2 2
      mainline/tests/general/test_basic/test_view_format_view_nest_stdout.gold.txt
  14. 1 1
      mainline/tests/general/test_basic/test_view_format_view_python_stdout.gold.txt
  15. 1 1
      mainline/tests/general/test_basic/test_view_format_view_txt_stdout.gold.txt
  16. 1 1
      mainline/tests/general/test_basic/test_view_format_view_xml_stdout.gold.txt
  17. 14 13
      mainline/tests/general/test_basic/test_workflow_info_default_stdout.gold.txt
  18. 15 14
      mainline/tests/general/test_basic/test_workflow_info_second_stdout.gold.txt
  19. 1 1
      mainline/tests/general/test_basic/test_workflow_view_default_stdout.gold.txt
  20. 2 2
      mainline/tests/general/test_basic/test_workflow_view_second_per_file_stdout.gold.txt
  21. 2 2
      mainline/tests/general/test_basic/test_workflow_view_second_stdout.gold.txt
  22. 1 1
      mainline/tests/general/test_std_code_cpp/test_parser_view_default_stdout.gold.txt
  23. 5 5
      mainline/tests/general/test_std_code_cpp/test_parser_view_files_stdout.gold.txt
  24. 1 1
      mainline/tests/general/test_std_code_cs/test_parser_view_default_stdout.gold.txt
  25. 3 3
      mainline/tests/general/test_std_code_cs/test_parser_view_files_stdout.gold.txt
  26. 1 1
      mainline/tests/general/test_std_code_java/test_parser_view_default_stdout.gold.txt
  27. 4 4
      mainline/tests/general/test_std_code_java/test_parser_view_files_stdout.gold.txt

+ 1 - 1
mainline/ext/std/tools/export.ini

@@ -24,4 +24,4 @@ module:  export
 class:   Plugin
 depends: mpp.dbf
 actions: export
-enabled: True
+enabled: False

+ 11 - 11
mainline/ext/std/tools/info.py

@@ -19,6 +19,7 @@
 
 
 import mpp.api
+import mpp.cout
 import mpp.utils
 
 class Plugin(mpp.api.Plugin, mpp.api.IRunable):
@@ -29,20 +30,20 @@ class Plugin(mpp.api.Plugin, mpp.api.IRunable):
         loader_prev = self.get_plugin_loader().get_plugin('mpp.dbf').get_loader_prev(none_if_empty=True)
         loader = self.get_plugin_loader().get_plugin('mpp.dbf').get_loader()
     
-        print "Properties:"
+        details = []
         for each in loader.iterate_properties():
             prev_value_str = ""
             if loader_prev != None:
                 prev = loader_prev.get_property(each.name)
                 if prev == None:
                     prev_value_str = " [new]"
-                    print "(!)",
                 elif prev != each.value:
                     prev_value_str = " [modified (was: " + loader_prev.get_property(each.name) + ")]"
-                    print "(!)",
-            print "\t" + each.name + "\t=>\t" + each.value + prev_value_str
+            details.append((each.name, each.value + prev_value_str))
+        path = self.get_plugin_loader().get_plugin('mpp.dbf').get_dbfile_path()
+        mpp.cout.notify(path, '', mpp.cout.SEVERITY_INFO, 'Created using plugins and settings:', details)
     
-        print "\nMetrics:"
+        details = []
         for each in sorted(loader.iterate_namespace_names()):
             for field in sorted(loader.get_namespace(each).iterate_field_names()):
                 prev_value_str = ""
@@ -53,16 +54,16 @@ class Plugin(mpp.api.Plugin, mpp.api.IRunable):
                         prev = prev_namespace.get_field_packager(field)
                     if prev == None:
                         prev_value_str = " [new]"
-                        print "(!)",
-                print "\t" + each + ":" + field + prev_value_str
+                details.append((each + ':' + field,  prev_value_str))
+        mpp.cout.notify(path, '', mpp.cout.SEVERITY_INFO, 'Collected metrics:', details)
     
-        print "\nFiles:"
         paths = None
         if len(args) == 0:
             paths = [""]
         else:
             paths = args
         for path in paths:
+            details = []
             path = mpp.utils.preprocess_path(path)
     
             file_iterator = loader.iterate_file_data(path=path)
@@ -76,11 +77,10 @@ class Plugin(mpp.api.Plugin, mpp.api.IRunable):
                     prev = loader_prev.load_file_data(each.get_path())
                     if prev == None:
                         prev_value_str = " [new]"
-                        print "(!)",
                     elif prev.get_checksum() != each.get_checksum():
                         prev_value_str = " [modified]"
-                        print "(!)",
-                print "\t" + each.get_path() + prev_value_str
+                details.append((each.get_path(), '{0:#x}'.format(each.get_checksum()) + prev_value_str))
+            mpp.cout.notify(path, '', mpp.cout.SEVERITY_INFO, 'Processed files and checksums:', details)
             
         return exit_code
 

+ 29 - 7
mainline/ext/std/tools/view.py

@@ -85,6 +85,7 @@ def export_to_str(out_format, paths, loader, loader_prev, nest_regions, dist_col
         if aggregated_data_prev != None:
             aggregated_data_tree = append_diff(aggregated_data_tree,
                                            aggregated_data_prev.get_data_tree())
+        aggregated_data_tree = append_suppressions(path, aggregated_data_tree, loader)
         aggregated_data_tree = compress_dist(aggregated_data_tree, dist_columns)
         
         file_data = loader.load_file_data(path)
@@ -214,6 +215,23 @@ def append_diff_list(main_list, prev_list):
                        '__diff__':merged_list[metric]['__diff__']})
     return result
 
+def append_suppressions(path, data, loader):
+    for namespace in data.keys():
+        for field in data[namespace].keys():
+            selected_data = loader.load_selected_data('std.suppress',
+                                       fields = ['list'],
+                                       path=path,
+                                       filters = [('list', 'LIKE', '%[{0}:{1}]%'.format(namespace, field))])
+            if selected_data == None:
+                data[namespace][field]['sup'] = 0
+            else:
+                count = 0
+                for each in selected_data:
+                    each = each # used
+                    count += 1
+                data[namespace][field]['sup'] = count
+    return data
+
 def compress_dist(data, columns):
     if columns == 0:
         return data
@@ -379,23 +397,23 @@ def cout_txt(data, loader):
                     "Metrics per file",
                     details)
 
-    attr_map = {'count': 'Measured',
-                'total': 'Total',
+    attr_map = {'total': 'Total',
                 'avg': 'Average',
                 'min': 'Minimum',
-                'max': 'Maximum'}
+                'max': 'Maximum',
+    }
     for namespace in data['aggregated-data'].keys():
         for field in data['aggregated-data'][namespace].keys():
             details = []
             diff_data = {}
             if '__diff__' in data['aggregated-data'][namespace][field].keys():
                 diff_data = data['aggregated-data'][namespace][field]['__diff__']
-            for attr in data['aggregated-data'][namespace][field].keys():
+            for attr in ['avg', 'min', 'max', 'total']:
                 diff_str = ""
-                if attr == 'distribution-bars' or attr == '__diff__' or attr == 'count':
-                    continue
                 if attr in diff_data.keys():
                     diff_str = " [" + ("+" if diff_data[attr] >= 0 else "") + str(diff_data[attr]) + "]"
+                if attr == 'avg' and data['aggregated-data'][namespace][field]['nonzero'] == True:
+                    diff_str += " (excluding zero metric values)"
                 details.append((attr_map[attr], str(data['aggregated-data'][namespace][field][attr]) + diff_str))
 
             measured = data['aggregated-data'][namespace][field]['count']
@@ -405,7 +423,11 @@ def cout_txt(data, loader):
             elem_name = 'regions'
             if loader.get_namespace(namespace).are_regions_supported() == False:
                 elem_name = 'files'
-            details.append(('Distribution', str(measured) + diff_str + ' ' + elem_name + ' measured'))
+            details.append(('Distribution',
+                            '{0}{1} {2} in total (including {3} suppressed)'.format(measured,
+                                                                                   diff_str,
+                                                                                   elem_name,
+                                                                                   data['aggregated-data'][namespace][field]['sup'])))
             details.append(('  Metric value', 'Ratio : R-sum : Number of ' + elem_name))
             sum_ratio = 0
             for bar in data['aggregated-data'][namespace][field]['distribution-bars']:

+ 1 - 3
mainline/mpp/api.py

@@ -952,9 +952,7 @@ class Loader(object):
             for field in data.keys():
                 if namespace.get_field_packager(field).get_python_type() == str:
                     continue
-                if namespace.get_field_packager(field).is_non_zero() == True:
-                    data[field]['min'] = None
-                    data[field]['avg'] = None
+                data[field]['nonzero'] = namespace.get_field_packager(field).is_non_zero()
                 distribution = self.db.count_rows(name, path_like = final_path_like, group_by_column = field)
                 data[field]['distribution-bars'] = []
                 for each in distribution:

+ 4 - 1
mainline/mpp/internal/dbwrap.py

@@ -162,7 +162,10 @@ class Database(object):
         def normalize_path(self, path):
             if path == None:
                 return None
-            return re.sub(r'''[\\]''', "/", path)
+            path =re.sub(r'''[\\]''', "/", path)
+            if len(path) > 0 and path[len(path) - 1] == '/':
+                return path[:-1]
+            return path 
         
         def update_dirs(self, db_loader, path = None):
             if db_loader.dirs == None:

+ 2 - 2
mainline/tests/general/test_basic.py

@@ -153,8 +153,8 @@ class Test(tests.common.TestCase):
         runner = tests.common.ToolRunner('limit', ['--help'])
         self.assertExec(runner.run())
 
-        runner = tests.common.ToolRunner('export', ['--help'])
-        self.assertExec(runner.run())
+        #runner = tests.common.ToolRunner('export', ['--help'])
+        #self.assertExec(runner.run())
 
     def test_view_format(self):
 

+ 0 - 1
mainline/tests/general/test_basic/test_help_--help_default_stdout.gold.txt

@@ -5,7 +5,6 @@ Usage: python metrix++.py --help
 Actions: 
   collect
   debug
-  export
   info
   limit
   test

+ 3 - 3
mainline/tests/general/test_basic/test_std_general_metrics_view_nest_per_file_stdout.gold.txt

@@ -55,7 +55,7 @@
 	Minimum        : None
 	Maximum        : None
 	Total          : 0.0
-	Distribution   : 0 files measured
+	Distribution   : 0 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
 
 ./simple.cpp:: info: Overall metrics for 'std.general:proctime' metric
@@ -63,7 +63,7 @@
 	Minimum        : 0.01
 	Maximum        : 0.01
 	Total          : 0.01
-	Distribution   : 1 files measured
+	Distribution   : 1 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
 	        0.0100 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
@@ -72,7 +72,7 @@
 	Minimum        : 487
 	Maximum        : 487
 	Total          : 487.0
-	Distribution   : 1 files measured
+	Distribution   : 1 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
 	           487 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 

+ 3 - 3
mainline/tests/general/test_basic/test_std_general_metrics_view_txt_stdout.gold.txt

@@ -3,7 +3,7 @@
 	Minimum        : None
 	Maximum        : None
 	Total          : 0.0
-	Distribution   : 0 files measured
+	Distribution   : 0 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
 
 :: info: Overall metrics for 'std.general:proctime' metric
@@ -11,7 +11,7 @@
 	Minimum        : 0.01
 	Maximum        : 0.01
 	Total          : 0.01
-	Distribution   : 1 files measured
+	Distribution   : 1 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
 	        0.0100 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
@@ -20,7 +20,7 @@
 	Minimum        : 487
 	Maximum        : 487
 	Total          : 487.0
-	Distribution   : 1 files measured
+	Distribution   : 1 files in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of files
 	           487 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 

+ 4 - 4
mainline/tests/general/test_basic/test_std_lines_metrics_view_nest_per_file_stdout.gold.txt

@@ -83,7 +83,7 @@
 	Minimum        : 0
 	Maximum        : 12
 	Total          : 44.0
-	Distribution   : 8 regions measured
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.125 : 0.125 : 1	|||||||||||||
 	             3 : 0.125 : 0.250 : 1	|||||||||||||
@@ -98,7 +98,7 @@
 	Minimum        : 0
 	Maximum        : 11
 	Total          : 41.0
-	Distribution   : 8 regions measured
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.125 : 0.125 : 1	|||||||||||||
 	             3 : 0.125 : 0.250 : 1	|||||||||||||
@@ -112,7 +112,7 @@
 	Minimum        : 0
 	Maximum        : 0
 	Total          : 0.0
-	Distribution   : 8 regions measured
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 1.000 : 1.000 : 8	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
@@ -121,7 +121,7 @@
 	Minimum        : 0
 	Maximum        : 2
 	Total          : 4.0
-	Distribution   : 8 regions measured
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.625 : 0.625 : 5	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 	             1 : 0.250 : 0.875 : 2	|||||||||||||||||||||||||

+ 4 - 4
mainline/tests/general/test_basic/test_std_lines_metrics_view_txt_stdout.gold.txt

@@ -3,7 +3,7 @@
 	Minimum        : 0
 	Maximum        : 12
 	Total          : 44.0
-	Distribution   : 8 regions measured
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.125 : 0.125 : 1	|||||||||||||
 	             3 : 0.125 : 0.250 : 1	|||||||||||||
@@ -18,7 +18,7 @@
 	Minimum        : 0
 	Maximum        : 11
 	Total          : 41.0
-	Distribution   : 8 regions measured
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.125 : 0.125 : 1	|||||||||||||
 	             3 : 0.125 : 0.250 : 1	|||||||||||||
@@ -32,7 +32,7 @@
 	Minimum        : 0
 	Maximum        : 0
 	Total          : 0.0
-	Distribution   : 8 regions measured
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 1.000 : 1.000 : 8	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
@@ -41,7 +41,7 @@
 	Minimum        : 0
 	Maximum        : 2
 	Total          : 4.0
-	Distribution   : 8 regions measured
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.625 : 0.625 : 5	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 	             1 : 0.250 : 0.875 : 2	|||||||||||||||||||||||||

+ 2 - 2
mainline/tests/general/test_basic/test_view_format_view_nest_per_file_stdout.gold.txt

@@ -92,14 +92,14 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic count="6" max="3" avg="1.33333333333" total="8.0" min="0">
+                <cyclomatic nonzero="False" count="6" total="8.0" min="0" max="3" avg="1.33333333333" sup="0">
                     <distribution-bars>
                         <distribution-bar count="1" __diff__="0" metric="0" ratio="0.166666666667" />
                         <distribution-bar count="3" __diff__="0" metric="1" ratio="0.5" />
                         <distribution-bar count="1" __diff__="0" metric="2" ratio="0.166666666667" />
                         <distribution-bar count="1" __diff__="0" metric="3" ratio="0.166666666667" />
                     </distribution-bars>
-                    <__diff__ count="2" max="0" avg="-0.166666666667" total="2.0" min="-1" />
+                    <__diff__ nonzero="0" count="2" avg="-0.166666666667" min="-1" max="0" total="2.0" />
                 </cyclomatic>
             </std.code.complexity>
         </aggregated-data>

+ 2 - 2
mainline/tests/general/test_basic/test_view_format_view_nest_stdout.gold.txt

@@ -10,14 +10,14 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic count="7" max="3" avg="1.57142857143" total="11.0" min="0">
+                <cyclomatic nonzero="False" count="7" total="11.0" min="0" max="3" avg="1.57142857143" sup="0">
                     <distribution-bars>
                         <distribution-bar count="1" __diff__="0" metric="0" ratio="0.142857142857" />
                         <distribution-bar count="3" __diff__="0" metric="1" ratio="0.428571428571" />
                         <distribution-bar count="1" __diff__="0" metric="2" ratio="0.142857142857" />
                         <distribution-bar count="2" __diff__="1" metric="3" ratio="0.285714285714" />
                     </distribution-bars>
-                    <__diff__ count="3" max="0" avg="0.0714285714286" total="5.0" min="-1" />
+                    <__diff__ nonzero="0" count="3" avg="0.0714285714286" min="-1" max="0" total="5.0" />
                 </cyclomatic>
             </std.code.complexity>
         </aggregated-data>

+ 1 - 1
mainline/tests/general/test_basic/test_view_format_view_python_stdout.gold.txt

@@ -1 +1 @@
-{'export': [{'data: {'info': {'path': '', 'id': 1}, 'file-data': {}, 'subfiles': [], 'subdirs': [u'.'], 'aggregated-data': {'std.code.complexity': {'cyclomatic': {'count': 4, 'distribution-bars': [{'count': 3, 'ratio': 0.75, 'metric': '1'}, {'count': 1, 'ratio': 0.25, 'metric': '3'}], 'avg': 1.5, 'min': 1, 'max': 3, 'total': 6.0}}}}}]}
+{'export': [{'data: {'info': {'path': '', 'id': 1}, 'file-data': {}, 'subfiles': [], 'subdirs': [u'.'], 'aggregated-data': {'std.code.complexity': {'cyclomatic': {'nonzero': False, 'count': 4, 'avg': 1.5, 'min': 1, 'max': 3, 'distribution-bars': [{'count': 3, 'ratio': 0.75, 'metric': '1'}, {'count': 1, 'ratio': 0.25, 'metric': '3'}], 'sup': 0, 'total': 6.0}}}}}]}

+ 1 - 1
mainline/tests/general/test_basic/test_view_format_view_txt_stdout.gold.txt

@@ -3,7 +3,7 @@
 	Minimum        : 1
 	Maximum        : 3
 	Total          : 6.0
-	Distribution   : 4 regions measured
+	Distribution   : 4 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             1 : 0.750 : 0.750 : 3	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 	             3 : 0.250 : 1.000 : 1	|||||||||||||||||||||||||

+ 1 - 1
mainline/tests/general/test_basic/test_view_format_view_xml_stdout.gold.txt

@@ -10,7 +10,7 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic count="4" max="3" avg="1.5" total="6.0" min="1">
+                <cyclomatic nonzero="False" count="4" total="6.0" min="1" max="3" avg="1.5" sup="0">
                     <distribution-bars>
                         <distribution-bar count="3" metric="1" ratio="0.75" />
                         <distribution-bar count="1" metric="3" ratio="0.25" />

+ 14 - 13
mainline/tests/general/test_basic/test_workflow_info_default_stdout.gold.txt

@@ -1,15 +1,16 @@
-Properties:
-	version	=>	1.0
-	std.code.complexity:version	=>	1.1
-	std.code.cpp:version	=>	1.1
-	std.code.cpp:files	=>	*.c,*.cc,*.cpp,*.cxx,*.h,*.hh,*.hpp,*.hxx
-	std.code.cs:version	=>	1.0
-	std.code.cs:files	=>	*.cs
-	std.code.java:version	=>	1.1
-	std.code.java:files	=>	*.java
+D:\Projects\Metrix++\tests\general\test_basic\test_workflow.db:: info: Created using plugins and settings:
+	version        : 1.0
+	std.code.complexity:version: 1.1
+	std.code.cpp:version: 1.1
+	std.code.cpp:files: *.c,*.cc,*.cpp,*.cxx,*.h,*.hh,*.hpp,*.hxx
+	std.code.cs:version: 1.0
+	std.code.cs:files: *.cs
+	std.code.java:version: 1.1
+	std.code.java:files: *.java
 
-Metrics:
-	std.code.complexity:cyclomatic
+D:\Projects\Metrix++\tests\general\test_basic\test_workflow.db:: info: Collected metrics:
+	std.code.complexity:cyclomatic: 
+
+:: info: Processed files and checksums:
+	./simple.cpp   : 0xbe3fa289
 
-Files:
-	./simple.cpp

+ 15 - 14
mainline/tests/general/test_basic/test_workflow_info_second_stdout.gold.txt

@@ -1,16 +1,17 @@
-Properties:
-	version	=>	1.0
-	std.code.complexity:version	=>	1.1
-	std.code.cpp:version	=>	1.1
-	std.code.cpp:files	=>	*.c,*.cc,*.cpp,*.cxx,*.h,*.hh,*.hpp,*.hxx
-	std.code.cs:version	=>	1.0
-	std.code.cs:files	=>	*.cs
-	std.code.java:version	=>	1.1
-	std.code.java:files	=>	*.java
+D:\Projects\Metrix++\tests\general\test_basic\test_workflow.db:: info: Created using plugins and settings:
+	version        : 1.0
+	std.code.complexity:version: 1.1
+	std.code.cpp:version: 1.1
+	std.code.cpp:files: *.c,*.cc,*.cpp,*.cxx,*.h,*.hh,*.hpp,*.hxx
+	std.code.cs:version: 1.0
+	std.code.cs:files: *.cs
+	std.code.java:version: 1.1
+	std.code.java:files: *.java
 
-Metrics:
-	std.code.complexity:cyclomatic
+D:\Projects\Metrix++\tests\general\test_basic\test_workflow.db:: info: Collected metrics:
+	std.code.complexity:cyclomatic: 
+
+:: info: Processed files and checksums:
+	./simple.cpp   : 0xf015c344 [modified]
+	./simple2.cpp  : 0x44023f81 [new]
 
-Files:
-(!) 	./simple.cpp [modified]
-(!) 	./simple2.cpp [new]

+ 1 - 1
mainline/tests/general/test_basic/test_workflow_view_default_stdout.gold.txt

@@ -10,7 +10,7 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic count="4" max="3" avg="1.5" total="6.0" min="1">
+                <cyclomatic nonzero="False" count="4" total="6.0" min="1" max="3" avg="1.5" sup="0">
                     <distribution-bars>
                         <distribution-bar count="3" metric="1" ratio="0.75" />
                         <distribution-bar count="1" metric="3" ratio="0.25" />

+ 2 - 2
mainline/tests/general/test_basic/test_workflow_view_second_per_file_stdout.gold.txt

@@ -72,14 +72,14 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic count="6" max="3" avg="1.33333333333" total="8.0" min="0">
+                <cyclomatic nonzero="False" count="6" total="8.0" min="0" max="3" avg="1.33333333333" sup="0">
                     <distribution-bars>
                         <distribution-bar count="1" __diff__="0" metric="0" ratio="0.166666666667" />
                         <distribution-bar count="3" __diff__="0" metric="1" ratio="0.5" />
                         <distribution-bar count="1" __diff__="0" metric="2" ratio="0.166666666667" />
                         <distribution-bar count="1" __diff__="0" metric="3" ratio="0.166666666667" />
                     </distribution-bars>
-                    <__diff__ count="2" max="0" avg="-0.166666666667" total="2.0" min="-1" />
+                    <__diff__ nonzero="0" count="2" avg="-0.166666666667" min="-1" max="0" total="2.0" />
                 </cyclomatic>
             </std.code.complexity>
         </aggregated-data>

+ 2 - 2
mainline/tests/general/test_basic/test_workflow_view_second_stdout.gold.txt

@@ -10,14 +10,14 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic count="7" max="3" avg="1.57142857143" total="11.0" min="0">
+                <cyclomatic nonzero="False" count="7" total="11.0" min="0" max="3" avg="1.57142857143" sup="0">
                     <distribution-bars>
                         <distribution-bar count="1" __diff__="0" metric="0" ratio="0.142857142857" />
                         <distribution-bar count="3" __diff__="0" metric="1" ratio="0.428571428571" />
                         <distribution-bar count="1" __diff__="0" metric="2" ratio="0.142857142857" />
                         <distribution-bar count="2" __diff__="1" metric="3" ratio="0.285714285714" />
                     </distribution-bars>
-                    <__diff__ count="3" max="0" avg="0.0714285714286" total="5.0" min="-1" />
+                    <__diff__ nonzero="0" count="3" avg="0.0714285714286" min="-1" max="0" total="5.0" />
                 </cyclomatic>
             </std.code.complexity>
         </aggregated-data>

+ 1 - 1
mainline/tests/general/test_std_code_cpp/test_parser_view_default_stdout.gold.txt

@@ -10,7 +10,7 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic count="86" max="2" avg="0.197674418605" total="17.0" min="0">
+                <cyclomatic nonzero="False" count="86" total="17.0" min="0" max="2" avg="0.197674418605" sup="0">
                     <distribution-bars>
                         <distribution-bar count="74" metric="0" ratio="0.860465116279" />
                         <distribution-bar count="7" metric="1" ratio="0.0813953488372" />

+ 5 - 5
mainline/tests/general/test_std_code_cpp/test_parser_view_files_stdout.gold.txt

@@ -42,7 +42,7 @@
 	Minimum        : 0
 	Maximum        : 0
 	Total          : 0.0
-	Distribution   : 3 regions measured
+	Distribution   : 3 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 1.000 : 1.000 : 3	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
@@ -426,7 +426,7 @@
 	Minimum        : 0
 	Maximum        : 2
 	Total          : 4.0
-	Distribution   : 51 regions measured
+	Distribution   : 51 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.941 : 0.941 : 48	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 	             1 : 0.039 : 0.980 :  2	||||
@@ -647,7 +647,7 @@
 	Minimum        : 0
 	Maximum        : 2
 	Total          : 6.0
-	Distribution   : 24 regions measured
+	Distribution   : 24 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.833 : 0.833 : 20	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 	             1 : 0.083 : 0.917 :  2	||||||||
@@ -704,7 +704,7 @@
 	Minimum        : 0
 	Maximum        : 2
 	Total          : 3.0
-	Distribution   : 4 regions measured
+	Distribution   : 4 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.500 : 0.500 : 2	||||||||||||||||||||||||||||||||||||||||||||||||||
 	             1 : 0.250 : 0.750 : 1	|||||||||||||||||||||||||
@@ -773,7 +773,7 @@
 	Minimum        : 0
 	Maximum        : 2
 	Total          : 4.0
-	Distribution   : 4 regions measured
+	Distribution   : 4 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.250 : 0.250 : 1	|||||||||||||||||||||||||
 	             1 : 0.500 : 0.750 : 2	||||||||||||||||||||||||||||||||||||||||||||||||||

+ 1 - 1
mainline/tests/general/test_std_code_cs/test_parser_view_default_stdout.gold.txt

@@ -10,7 +10,7 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic count="39" max="6" avg="1.15384615385" total="45.0" min="0">
+                <cyclomatic nonzero="False" count="39" total="45.0" min="0" max="6" avg="1.15384615385" sup="0">
                     <distribution-bars>
                         <distribution-bar count="23" metric="0" ratio="0.589743589744" />
                         <distribution-bar count="7" metric="1" ratio="0.179487179487" />

+ 3 - 3
mainline/tests/general/test_std_code_cs/test_parser_view_files_stdout.gold.txt

@@ -160,7 +160,7 @@
 	Minimum        : 0
 	Maximum        : 6
 	Total          : 39.0
-	Distribution   : 19 regions measured
+	Distribution   : 19 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.316 : 0.316 :  6	||||||||||||||||||||||||||||||||
 	             1 : 0.263 : 0.579 :  5	||||||||||||||||||||||||||
@@ -273,7 +273,7 @@
 	Minimum        : 0
 	Maximum        : 1
 	Total          : 1.0
-	Distribution   : 8 regions measured
+	Distribution   : 8 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.875 : 0.875 : 7	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 	             1 : 0.125 : 1.000 : 1	|||||||||||||
@@ -397,7 +397,7 @@
 	Minimum        : 0
 	Maximum        : 4
 	Total          : 5.0
-	Distribution   : 12 regions measured
+	Distribution   : 12 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.833 : 0.833 : 10	|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 	             1 : 0.083 : 0.917 :  1	||||||||

+ 1 - 1
mainline/tests/general/test_std_code_java/test_parser_view_default_stdout.gold.txt

@@ -10,7 +10,7 @@
         </subdirs>
         <aggregated-data>
             <std.code.complexity>
-                <cyclomatic count="119" max="6" avg="1.05882352941" total="126.0" min="0">
+                <cyclomatic nonzero="False" count="119" total="126.0" min="0" max="6" avg="1.05882352941" sup="0">
                     <distribution-bars>
                         <distribution-bar count="58" metric="0" ratio="0.487394957983" />
                         <distribution-bar count="31" metric="1" ratio="0.260504201681" />

+ 4 - 4
mainline/tests/general/test_std_code_java/test_parser_view_files_stdout.gold.txt

@@ -322,7 +322,7 @@
 	Minimum        : 0
 	Maximum        : 6
 	Total          : 83.0
-	Distribution   : 43 regions measured
+	Distribution   : 43 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.186 : 0.186 :  8	|||||||||||||||||||
 	             1 : 0.326 : 0.512 : 14	|||||||||||||||||||||||||||||||||
@@ -354,7 +354,7 @@
 	Minimum        : 0
 	Maximum        : 0
 	Total          : 0.0
-	Distribution   : 1 regions measured
+	Distribution   : 1 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 1.000 : 1.000 : 1	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 
@@ -689,7 +689,7 @@
 	Minimum        : 0
 	Maximum        : 6
 	Total          : 37.0
-	Distribution   : 44 regions measured
+	Distribution   : 44 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.523 : 0.523 : 23	||||||||||||||||||||||||||||||||||||||||||||||||||||
 	             1 : 0.295 : 0.818 : 13	||||||||||||||||||||||||||||||
@@ -938,7 +938,7 @@
 	Minimum        : 0
 	Maximum        : 2
 	Total          : 6.0
-	Distribution   : 31 regions measured
+	Distribution   : 31 regions in total (including 0 suppressed)
 	  Metric value : Ratio : R-sum : Number of regions
 	             0 : 0.839 : 0.839 : 26	||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 	             1 : 0.129 : 0.968 :  4	|||||||||||||