浏览代码

Changed script's CSV formats to allow for merging different measurements

- size  -> code_size
- size  -> data_size
- frame -> stack_frame
- limit -> stack_limit
- hits  -> coverage_hits
- count -> coverage_count
Christopher Haster 3 年之前
父节点
当前提交
d7582efec8
共有 4 个文件被更改,包括 16 次插入16 次删除
  1. 3 3
      scripts/code.py
  2. 5 5
      scripts/coverage.py
  3. 3 3
      scripts/data.py
  4. 5 5
      scripts/stack.py

+ 3 - 3
scripts/code.py

@@ -81,7 +81,7 @@ def main(**args):
             results = [
                 (   result['file'],
                     result['function'],
-                    int(result['size']))
+                    int(result['code_size']))
                 for result in r]
 
     total = 0
@@ -95,7 +95,7 @@ def main(**args):
             prev_results = [
                 (   result['file'],
                     result['function'],
-                    int(result['size']))
+                    int(result['code_size']))
                 for result in r]
 
         prev_total = 0
@@ -106,7 +106,7 @@ def main(**args):
     if args.get('output'):
         with open(args['output'], 'w') as f:
             w = csv.writer(f)
-            w.writerow(['file', 'function', 'size'])
+            w.writerow(['file', 'function', 'code_size'])
             for file, func, size in sorted(results):
                 w.writerow((file, func, size))
 

+ 5 - 5
scripts/coverage.py

@@ -88,8 +88,8 @@ def main(**args):
             results = [
                 (   result['file'],
                     result['function'],
-                    int(result['hits']),
-                    int(result['count']))
+                    int(result['coverage_hits']),
+                    int(result['coverage_count']))
                 for result in r]
 
     total_hits, total_count = 0, 0
@@ -104,8 +104,8 @@ def main(**args):
             prev_results = [
                 (   result['file'],
                     result['function'],
-                    int(result['hits']),
-                    int(result['count']))
+                    int(result['coverage_hits']),
+                    int(result['coverage_count']))
                 for result in r]
 
         prev_total_hits, prev_total_count = 0, 0
@@ -117,7 +117,7 @@ def main(**args):
     if args.get('output'):
         with open(args['output'], 'w') as f:
             w = csv.writer(f)
-            w.writerow(['file', 'function', 'hits', 'count'])
+            w.writerow(['file', 'function', 'coverage_hits', 'coverage_count'])
             for file, func, hits, count in sorted(results):
                 w.writerow((file, func, hits, count))
 

+ 3 - 3
scripts/data.py

@@ -81,7 +81,7 @@ def main(**args):
             results = [
                 (   result['file'],
                     result['function'],
-                    int(result['size']))
+                    int(result['data_size']))
                 for result in r]
 
     total = 0
@@ -95,7 +95,7 @@ def main(**args):
             prev_results = [
                 (   result['file'],
                     result['function'],
-                    int(result['size']))
+                    int(result['data_size']))
                 for result in r]
 
         prev_total = 0
@@ -106,7 +106,7 @@ def main(**args):
     if args.get('output'):
         with open(args['output'], 'w') as f:
             w = csv.writer(f)
-            w.writerow(['file', 'function', 'size'])
+            w.writerow(['file', 'function', 'data_size'])
             for file, func, size in sorted(results):
                 w.writerow((file, func, size))
 

+ 5 - 5
scripts/stack.py

@@ -129,8 +129,8 @@ def main(**args):
             results = [
                 (   result['file'],
                     result['function'],
-                    int(result['frame']),
-                    float(result['limit'])) # note limit can be inf
+                    int(result['stack_frame']),
+                    float(result['stack_limit'])) # note limit can be inf
                 for result in r]
 
     total_frame = 0
@@ -146,8 +146,8 @@ def main(**args):
             prev_results = [
                 (   result['file'],
                     result['function'],
-                    int(result['frame']),
-                    float(result['limit']))
+                    int(result['stack_frame']),
+                    float(result['stack_limit']))
                 for result in r]
 
         prev_total_frame = 0
@@ -160,7 +160,7 @@ def main(**args):
     if args.get('output'):
         with open(args['output'], 'w') as f:
             w = csv.writer(f)
-            w.writerow(['file', 'function', 'frame', 'limit'])
+            w.writerow(['file', 'function', 'stack_frame', 'stack_limit'])
             for file, func, frame, limit in sorted(results):
                 w.writerow((file, func, frame, limit))