[Erp5-report] r41528 arnaud.fontaine - /erp5/trunk/utils/erp5mechanize/runBenchmarks.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Dec 20 08:12:03 CET 2010


Author: arnaud.fontaine
Date: Mon Dec 20 08:12:03 2010
New Revision: 41528

URL: http://svn.erp5.org?rev=41528&view=rev
Log:
Attribute 'name' of BenchmarkThread, giving the username to log in with, 
clashes with the Thread name (actually defined as a property in Thread in 
Python standard library), thus rename it to username 


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=41528&r1=41527&r2=41528&view=diff
==============================================================================
--- erp5/trunk/utils/erp5mechanize/runBenchmarks.py [utf8] (original)
+++ erp5/trunk/utils/erp5mechanize/runBenchmarks.py [utf8] Mon Dec 20 08:12:03 2010
@@ -64,12 +64,12 @@ class BenchmarkThread(Thread):
     Benchmarking thread.
     Runs tests as a given user on a given ERP5 instance.
   """
-  def __init__(self, url, name, password, test_list):
+  def __init__(self, url, username, password, test_list):
     """
       Set initial thread values.
     """
     Thread.__init__(self)
-    self.name = name
+    self.username = username
     self.password = password
     self.test_list = test_list
     self.url = url
@@ -104,7 +104,7 @@ class BenchmarkThread(Thread):
     for test in self.test_list:
       try:
         result = test['function'](url=self.url,
-                                  name=self.name,
+                                  name=self.username,
                                   password=self.password,
                                   lazyness=self.lazyness,
                                   **test.get('kw', {}))
@@ -214,7 +214,7 @@ def main(instance_list, test_list, dresu
       else:
         user = None
       if user is not None:
-        thread = BenchmarkThread(url=instance['url'], name=user['name'],
+        thread = BenchmarkThread(url=instance['url'], username=user['name'],
                                  password=user['password'],
                                  test_list=(user.get('test_list') or test_list) * (Repeat + 1))
         thread.setName('%s@%s' % (user['name'], instance['url']))



More information about the Erp5-report mailing list