CMS 3D CMS Logo

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__ (self, host, port, perfcmds, queue)
 
def run (self)
 

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

Constructor & Destructor Documentation

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

Definition at line 251 of file cmsPerfClient.py.

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

Member Function Documentation

def cmsPerfClient.Worker.run (   self)

Definition at line 258 of file cmsPerfClient.py.

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

258  def run(self):
259  try:
260  data = request_benchmark(self.__perfcmds, self.__host, self.__port)
261  #Debugging
262  print("data is %s"%data)
263  print("Puttin it in the queue as (%s,%s)"%(self.__host,data))
264  self.__queue.put((self.__host, data))
265  except (exceptions.Exception, xmlrpclib.Fault) as detail:
266  print("Exception was thrown when receiving/submitting job information to host", self.__host, ". Exception information:")
267  print(detail)
268  sys.stdout.flush()
269 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def request_benchmark(perfcmds, shost, sport)
Request benchmark Connects to server and returns data returns: profiling data from server...

Member Data Documentation

cmsPerfClient.Worker.__host
private

Definition at line 253 of file cmsPerfClient.py.

Referenced by cmsPerfClient.Worker.run().

cmsPerfClient.Worker.__perfcmds
private

Definition at line 252 of file cmsPerfClient.py.

Referenced by cmsPerfClient.Worker.run().

cmsPerfClient.Worker.__port
private

Definition at line 254 of file cmsPerfClient.py.

Referenced by cmsPerfClient.Worker.run().

cmsPerfClient.Worker.__queue
private

Definition at line 255 of file cmsPerfClient.py.