From 921500e890b8507d345edadff8d4c79de2e34cb2 Mon Sep 17 00:00:00 2001
From: Daniel Friesel <daniel.friesel@uos.de>
Date: Thu, 20 Oct 2022 15:23:27 +0200
Subject: kconfig: support repeated measurements of identical configurations

---
 bin/explore-kconfig.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

(limited to 'bin')

diff --git a/bin/explore-kconfig.py b/bin/explore-kconfig.py
index deb19b7..a43f37b 100755
--- a/bin/explore-kconfig.py
+++ b/bin/explore-kconfig.py
@@ -54,6 +54,17 @@ def main():
         action="store_true",
         help="Explore neighbourhood of successful random configurations",
     )
+    parser.add_argument(
+        "--repeatable",
+        action="store_true",
+        help="Allow repeated measurements of already benchmarked configurations",
+    )
+    parser.add_argument(
+        "--repeat",
+        type=int,
+        metavar="N",
+        help="Run each benchmark N times. Implies --repeatable",
+    )
     parser.add_argument(
         "--clean-command", type=str, help="Clean command", default="make clean"
     )
@@ -96,6 +107,11 @@ def main():
         kconf.randconfig_command = args.randconfig_command
     if args.kconfig_file:
         kconf.kconfig = args.kconfig_file
+    if args.repeatable:
+        kconf.repeatable = args.repeatable
+    if args.repeat:
+        kconf.repeat = args.repeat - 1
+        kconf.repeatable = True
 
     kconf.run_nfpkeys()
 
-- 
cgit v1.2.3