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 247 of file cmsPerfClient.py.

Constructor & Destructor Documentation

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

Definition at line 249 of file cmsPerfClient.py.

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

Member Function Documentation

def cmsPerfClient.Worker.run (   self)

Definition at line 256 of file cmsPerfClient.py.

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

257  def run(self):
258  try:
259  data = request_benchmark(self.__perfcmds, self.__host, self.__port)
260  #Debugging
261  print "data is %s"%data
262  print "Puttin it in the queue as (%s,%s)"%(self.__host,data)
263  self.__queue.put((self.__host, data))
264  except (exceptions.Exception, xmlrpclib.Fault) as detail:
265  print "Exception was thrown when receiving/submitting job information to host", self.__host, ". Exception information:"
266  print detail
267  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 251 of file cmsPerfClient.py.

Referenced by cmsPerfClient.Worker.run().

cmsPerfClient.Worker.__perfcmds
private

Definition at line 250 of file cmsPerfClient.py.

Referenced by cmsPerfClient.Worker.run().

cmsPerfClient.Worker.__port
private

Definition at line 252 of file cmsPerfClient.py.

Referenced by cmsPerfClient.Worker.run().

cmsPerfClient.Worker.__queue
private

Definition at line 253 of file cmsPerfClient.py.