CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | 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...

Inheritance diagram for cmsPerfClient.Worker:

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.

249  def __init__(self, host, port, perfcmds, queue):
250  self.__perfcmds = perfcmds
251  self.__host = host
252  self.__port = port
253  self.__queue = queue
254  threading.Thread.__init__(self)

Member Function Documentation

def cmsPerfClient.Worker.run (   self)

Definition at line 255 of file cmsPerfClient.py.

References cmsPerfClient.Worker.__host, cmsPerfClient.Worker.__perfcmds, cmsPerfClient.Worker.__port, and cmsPerfClient.request_benchmark().

256  def run(self):
257  try:
258  data = request_benchmark(self.__perfcmds, self.__host, self.__port)
259  #Debugging
260  print "data is %s"%data
261  print "Puttin it in the queue as (%s,%s)"%(self.__host,data)
262  self.__queue.put((self.__host, data))
263  except (exceptions.Exception, xmlrpclib.Fault), detail:
264  print "Exception was thrown when receiving/submitting job information to host", self.__host, ". Exception information:"
265  print detail
266  sys.stdout.flush()
def request_benchmark
Request benchmark Connects to server and returns data returns: profiling data from server...

Member Data Documentation

cmsPerfClient.Worker.__host
private

Definition at line 250 of file cmsPerfClient.py.

Referenced by cmsPerfClient.Worker.run().

cmsPerfClient.Worker.__perfcmds
private

Definition at line 249 of file cmsPerfClient.py.

Referenced by cmsPerfClient.Worker.run().

cmsPerfClient.Worker.__port
private

Definition at line 251 of file cmsPerfClient.py.

Referenced by cmsPerfClient.Worker.run().

cmsPerfClient.Worker.__queue
private

Definition at line 252 of file cmsPerfClient.py.