bt2 benchmark: parsers must be defined first
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 30 Jul 2019 21:48:31 +0000 (17:48 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 30 Jul 2019 21:48:31 +0000 (17:48 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
scripts/babeltrace-benchmark/time.py

index e1506a86e25d35b17be3eafd4b9b33edcd22a487..7bf51714350ad7d30bba220d321a9c8698061f9a 100644 (file)
@@ -21,31 +21,6 @@ import tempfile
 import json
 from collections import defaultdict
 
-_METRIC = {
-    "User time (seconds)": float,
-    "System time (seconds)": float,
-    "Percent of CPU this job got": percent_parser,
-    "Elapsed (wall clock) time (h:mm:ss or m:ss)": wall_clock_parser,
-    "Average shared text size (kbytes)": int,
-    "Average unshared data size (kbytes)": int,
-    "Average stack size (kbytes)": int,
-    "Average total size (kbytes)": int,
-    "Maximum resident set size (kbytes)": int,
-    "Average resident set size (kbytes)": int,
-    "Major (requiring I/O) page faults": int,
-    "Minor (reclaiming a frame) page faults": int,
-    "Voluntary context switches": int,
-    "Involuntary context switches": int,
-    "Swaps": int,
-    "File system inputs": int,
-    "File system outputs": int,
-    "Socket messages sent": int,
-    "Socket messages received": int,
-    "Signals delivered": int,
-    "Page size (bytes)": int,
-}
-
-
 def wall_clock_parser(value):
     """
     Parse /usr/bin/time wall clock value.
@@ -82,6 +57,32 @@ def percent_parser(value):
     return 0
 
 
+_METRIC = {
+    "User time (seconds)": float,
+    "System time (seconds)": float,
+    "Percent of CPU this job got": percent_parser,
+    "Elapsed (wall clock) time (h:mm:ss or m:ss)": wall_clock_parser,
+    "Average shared text size (kbytes)": int,
+    "Average unshared data size (kbytes)": int,
+    "Average stack size (kbytes)": int,
+    "Average total size (kbytes)": int,
+    "Maximum resident set size (kbytes)": int,
+    "Average resident set size (kbytes)": int,
+    "Major (requiring I/O) page faults": int,
+    "Minor (reclaiming a frame) page faults": int,
+    "Voluntary context switches": int,
+    "Involuntary context switches": int,
+    "Swaps": int,
+    "File system inputs": int,
+    "File system outputs": int,
+    "Socket messages sent": int,
+    "Socket messages received": int,
+    "Signals delivered": int,
+    "Page size (bytes)": int,
+}
+
+
+
 def parse(path, results):
     """
     Parser and accumulator for /usr/bin/time results.
This page took 0.02371 seconds and 4 git commands to generate.