From 637f5ac10bb568532cfad04cc483f25486de6713 Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Thu, 16 Jun 2011 06:38:37 +0000
Subject: [PATCH] Allow to specify the starting user index.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@45899 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 erp5/util/benchmark/runBenchmark.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/erp5/util/benchmark/runBenchmark.py b/erp5/util/benchmark/runBenchmark.py
index 3dfd343aa0..f7e9decb28 100755
--- a/erp5/util/benchmark/runBenchmark.py
+++ b/erp5/util/benchmark/runBenchmark.py
@@ -89,6 +89,13 @@ def parseArguments(argv):
                       help='Repeat the benchmark suite N times '
                            '(default: infinite)')
 
+  parser.add_argument('--user-index',
+                      type=int,
+                      default=0,
+                      metavar='INDEX',
+                      help='Index of the first user within userInfo '
+                           '(default: 0)')
+
   # Mandatory arguments
   parser.add_argument('url',
                       type=ArgumentType.ERP5UrlType,
@@ -120,6 +127,7 @@ def parseArguments(argv):
   max_nb_users = isinstance(namespace.users, tuple) and namespace.users[1] or \
       namespace.users
 
+  namespace.user_tuple = namespace.user_tuple[namespace.user_index:]
   if max_nb_users > len(namespace.user_tuple):
     raise argparse.ArgumentTypeError("Not enough users in the given file")
 
-- 
2.30.9