[Fuego] [PATCH] Dhrystone: Add 'one run through Dhrystone' value in the report

[email protected] Tue, 12 Apr 2022 17:22:42 +0530
Newsgroups dev.linux.lists.fuego
Message-ID <[email protected]>
From: sireesha <[email protected]>

parser.py: update parser file to parse 'Microseconds of one run through Dhrystone'

reference.json: Add reference for 'Microseconds of one run through Dhrystone'

Signed-off-by: sireesha <[email protected]>
---
 tests/Benchmark.Dhrystone/parser.py      | 6 +++---
 tests/Benchmark.Dhrystone/reference.json | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/Benchmark.Dhrystone/parser.py b/tests/Benchmark.Dhrystone/parser.py
index 261d661..62447e9 100755
--- a/tests/Benchmark.Dhrystone/parser.py
+++ b/tests/Benchmark.Dhrystone/parser.py
@@ -3,12 +3,12 @@
 import os, re, sys
 import common as plib
 
-regex_string = "^(Dhrystones.per.Second:)(\ *)([\d]{1,8}.?[\d]{1,3})(.*)$"
-
+regex_string = "^(Microseconds.for.one.run.through.Dhrystone:|Dhrystones.per.Second:)(\ *)([\d]{1,8}.?[\d]{1,3})(.*)$"
 measurements = {}
+
 matches = plib.parse_log(regex_string)
 
 if matches:
-    measurements['default.Dhrystone'] = [{"name": "Score", "measure" : float(matches[0][2])}]
+    measurements['default.Dhrystone'] = [{"name": "microseconds_onerun", "measure" : float(matches[0][2])},{"name": "Score", "measure" : float(matches[1][2])}]
 
 sys.exit(plib.process(measurements))
diff --git a/tests/Benchmark.Dhrystone/reference.json b/tests/Benchmark.Dhrystone/reference.json
index 532ac16..443ebcf 100644
--- a/tests/Benchmark.Dhrystone/reference.json
+++ b/tests/Benchmark.Dhrystone/reference.json
@@ -9,7 +9,12 @@
                         {
                             "name":"Score",
                             "unit":"Dhrystones/s"
+                        },
+			{
+                            "name":"microseconds_onerun",
+                            "unit":"us"
                         }
+
                     ]
                 }
             ]
-- 
2.20.1