changeset 49486:5acbc550d987

compare-disco: support for `file` nodes specification This leverage the `nodefromfile` feature in core. This make it possible for callers to no longer pay the subset computation cost (and to make sure the subset is the right one, even when the base repository is different)
author Pierre-Yves DAVID <pierre-yves.david@octobus.net>
date Sun, 05 Jun 2022 07:16:29 +0200
parents ef0b0f94d2e5
children f59e49f6bee4
files contrib/perf-utils/compare-discovery-case
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf-utils/compare-discovery-case	Sat Jun 04 19:10:51 2022 +0200
+++ b/contrib/perf-utils/compare-discovery-case	Sun Jun 05 07:16:29 2022 +0200
@@ -99,7 +99,11 @@
 
 def parse_case(case):
     case_type, case_args = case.split('-', 1)
-    case = (case_type,) + tuple(int(x) for x in case_args.split('-'))
+    if case_type == 'file':
+        case_args = (case_args,)
+    else:
+        case_args = tuple(int(x) for x in case_args.split('-'))
+    case = (case_type,) + case_args
     return case
 
 
@@ -115,6 +119,8 @@
         return '::randomantichain(all(), "%d")' % case[1]
     elif t == 'rev':
         return '::%d' % case[1]
+    elif t == 'file':
+        return '::nodefromfile("%s")' % case[1]
     else:
         assert False