Index: /tbroadcast/v2/python/tbroadcast.py
===================================================================
--- /tbroadcast/v2/python/tbroadcast.py	(revision 244)
+++ /tbroadcast/v2/python/tbroadcast.py	(revision 245)
@@ -26,5 +26,5 @@
 class Scheduler:
 
-    def __init__(self, num_workers=20, file=None, ignore_cycles=False, local=False, output=None, error=None, silent = False):
+    def __init__(self, num_workers=20, file=None, ignore_cycles=False, local=False, output=None, error=None, silent = False, perf=False):
         self.pool            = ThreadPool(num_workers=num_workers)
         self.current_package = self.get_current_package()
@@ -38,4 +38,8 @@
         self.error           = error
         self.silent          = silent
+        self.perf            = perf
+        if self.perf:
+            f = open ('performances.log', 'w+')
+            f.close()
         if output is not None:
             if not os.path.exists (output):
@@ -410,18 +414,21 @@
       #print "**Result: %s from request #%s" % (str(result), request.requestID)
       #print "# Result: %s from request #%s" % (result['package'], request.requestID)
-      self.execute (result['cmd'])
+      #if result['package'] == 'CodeCheck':
+      #    sys.exit(-1)
+      self.execute (result['cmd'])    
 
     # the work the threads will have to do 
     def do_execute(self, arg):
       path = self.get_work_area_path (arg['package'])
-      if path == None:
+      if path == None or not os.path.exists(path):
           raise RuntimeError('Path to package '+ arg['package'] +' not found')
       self.set_work_unit_status (arg['package'], 'running')      
-      cmd = "cmt -use="+ arg['package'] + " run '"+ arg['cmd'] + "'"
-      os.chdir(path)        
+      #cmd = "cmt -use="+ arg['package'] + " run '"+ arg['cmd'] + "'"      
+      #os.chdir(path)
+      #arg['cmd'] = "cd "+ path +";"+ arg['cmd']
       print '#--------------------------------------------------------------'
       print '# ('+str(self.get_counter())+'/'+str(len(self.packages))+') Now trying ['+ arg['cmd']+'] in ' + path
       print '#--------------------------------------------------------------'
-      cmd = arg['cmd'] 
+      cmd = "cd "+ path +";"+ arg['cmd'] 
       #status, output= commands.getstatusoutput(cmd)
       # init output file
@@ -431,6 +438,14 @@
            if self.error is not None:
                f = open (self.error+'/'+arg['package']+'_error.log', 'w+')
-               f.close()            
+               f.close()
+      self.packages[arg['package']] ['startTime'] = time.time ()                     
       status, output, error, pythonError  = exeCommand(sCmd=cmd, oLineCallback=self.redirectOutput, arg=arg)#,iTimeout = 3600)
+      self.packages[arg['package']] ['endTime'] = time.time ()
+      if self.perf:
+          self.semaphore.acquire ()        
+          f = open ('performances.log', 'a')
+          f.write (arg['package']+" "+str(self.packages[arg['package']] ['startTime'])+" "+str(self.packages[arg['package']] ['endTime'] )+'\n')  
+          f.close()
+          self.semaphore.release()
       self.suppress_work_unit (arg['package'])
       self.set_work_unit_status (arg['package'], 'done')
@@ -465,7 +480,7 @@
       #print "# Exception occured in request #%s: %s" %(request.requestID, exc_info[1])
       print "# Exception occured: %s" %(exc_info[1])
+      print exc_info
       print '#--------------------------------------------------------------'    
-      sys.exit(-1)
-
+      #sys.exit(-1)
 
 #--------- EoF --------#
Index: /tbroadcast/v2/scripts/tbroadcast
===================================================================
--- /tbroadcast/v2/scripts/tbroadcast	(revision 244)
+++ /tbroadcast/v2/scripts/tbroadcast	(revision 245)
@@ -40,4 +40,5 @@
     ignore_cycles = False
     silent        = False
+    perf          = False     
     output        = None
     error         = None
@@ -50,4 +51,6 @@
              if option == '-f':
                 file = string.split(arg,'=')[1]
+             if option == '-perf':
+                perf = True
              if option == '-output':
                 output = string.split(arg,'=')[1]
@@ -59,6 +62,5 @@
                  ignore_cycles = True
              if option == '-silent':             
-                 silent = True
-                 
+                 silent = True                 
              if option == '-help':    
                   usage()
@@ -74,5 +76,5 @@
               command = arg
 
-    master = Scheduler (num_workers=num_worker, file=file, ignore_cycles=ignore_cycles, local=local, output=output, error=error, silent=silent)
+    master = Scheduler (num_workers=num_worker, file=file, ignore_cycles=ignore_cycles, local=local, output=output, error=error, silent=silent, perf=perf)
     if test:
         master.simulate_execution()
