[Erp5-report] r8947 - /erp5/trunk/utils/erp5mechanize/runBenchmarks.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Aug 1 10:28:52 CEST 2006
Author: vincent
Date: Tue Aug 1 10:28:49 2006
New Revision: 8947
URL: http://svn.erp5.org?rev=8947&view=rev
Log:
Remove "verbose" parameter, it was not used.
Add the possibility to store default arguments in the config file.
Modified:
erp5/trunk/utils/erp5mechanize/runBenchmarks.py
Modified: erp5/trunk/utils/erp5mechanize/runBenchmarks.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5mechanize/runBenchmarks.py?rev=8947&r1=8946&r2=8947&view=diff
==============================================================================
--- erp5/trunk/utils/erp5mechanize/runBenchmarks.py (original)
+++ erp5/trunk/utils/erp5mechanize/runBenchmarks.py Tue Aug 1 10:28:49 2006
@@ -254,7 +254,7 @@
if __name__ == '__main__':
import getopt
possible_arg_list = ('config', 'dresults', 'results', 'load', 'Lazyness', 'usercount', 'Repeat', 'zopecount')
- possible_opt_list = ('verbose', )
+ possible_opt_list = (, )
kw = {}
args = []
try:
@@ -277,7 +277,11 @@
file, path, description = imp.find_module(kw['config'], sys.path)
module = imp.load_module(kw['config'], file, path, description)
file.close()
- del kw['config']
+ del kw['config'] # It should not be passed to main
+ if module.hasattr('runBenchmarks_parameter_list'):
+ for k in possible_arg_list:
+ if k != 'config' and module.runBenchmarks_parameter_list.has_key[k] and not kw.has_key[k]:
+ kw[k] = module.runBenchmarks_parameter_list[k]
args.append(module.instance_list)
args.append(module.test_list)
else:
@@ -287,6 +291,8 @@
print " test_list ex: [{'id': 'theFirstTest',"
print " 'function': someStandaloneTestFunction,"
print " 'kw': {'some_parameter': 'some_value_used_in_test_function'}}]"
+ print " Optionally, it can also contain :"
+ print " runBenchmarks_parameter_list ex: {'Repeat': '3', 'Lazyness': '1'}"
print "The test function has the following prototype :"
print " someStandaloneTestFunction(url, name, password) -> [TimeResult[, TimeResult[, ...]]]"
try:
More information about the Erp5-report
mailing list