[Erp5-report] r45899 arnaud.fontaine - /erp5/trunk/utils/erp5.utils.benchmark/src/erp5/util...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jun 16 08:38:37 CEST 2011
Author: arnaud.fontaine
Date: Thu Jun 16 08:38:37 2011
New Revision: 45899
URL: http://svn.erp5.org?rev=45899&view=rev
Log:
Allow to specify the starting user index.
Modified:
erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/runBenchmark.py
Modified: erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/runBenchmark.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/runBenchmark.py?rev=45899&r1=45898&r2=45899&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/runBenchmark.py [utf8] (original)
+++ erp5/trunk/utils/erp5.utils.benchmark/src/erp5/utils/benchmark/runBenchmark.py [utf8] Thu Jun 16 08:38:37 2011
@@ -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")
More information about the Erp5-report
mailing list