CMS 3D CMS Logo

Public Member Functions | Private Attributes

cmsPerfClient::Worker Class Reference

Worker This is a subclass of thread that submits commands to the server and stores the result in a thread-safe queue. More...

List of all members.

Public Member Functions

def __init__
def run

Private Attributes

 __host
 __perfcmds
 __port
 __queue

Detailed Description

Worker This is a subclass of thread that submits commands to the server and stores the result in a thread-safe queue.

Definition at line 246 of file cmsPerfClient.py.


Constructor & Destructor Documentation

def cmsPerfClient::Worker::__init__ (   self,
  host,
  port,
  perfcmds,
  queue 
)

Definition at line 248 of file cmsPerfClient.py.

00249                                                    :
00250         self.__perfcmds = perfcmds
00251         self.__host  = host
00252         self.__port  = port
00253         self.__queue = queue
00254         threading.Thread.__init__(self)


Member Function Documentation

def cmsPerfClient::Worker::run (   self)

Definition at line 255 of file cmsPerfClient.py.

00256                  :
00257         try:
00258             data = request_benchmark(self.__perfcmds, self.__host, self.__port)
00259             #Debugging
00260             print "data is %s"%data
00261             print "Puttin it in the queue as (%s,%s)"%(self.__host,data)
00262             self.__queue.put((self.__host, data))
00263         except (exceptions.Exception, xmlrpclib.Fault), detail:
00264             print "Exception was thrown when receiving/submitting job information to host", self.__host, ". Exception information:"
00265             print detail
00266             sys.stdout.flush()


Member Data Documentation

Definition at line 248 of file cmsPerfClient.py.

Definition at line 248 of file cmsPerfClient.py.

Definition at line 248 of file cmsPerfClient.py.

Definition at line 248 of file cmsPerfClient.py.