CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
crabFunctions.TaskStats Class Reference

Class holds job statistics for several Crab tasks. More...

Public Member Functions

def __init__ (self, tasklist=None)
 The object constructor. More...
 
def clearStats (self)
 This function sets all counts to zero. More...
 
def updateStats (self, tasklist)
 This function updates the statistics for a given tasklist. More...
 

Public Attributes

 nComplete
 
 nCooloff
 
 nFailed
 
 nFinished
 
 nIdle
 
 nRunning
 
 nTasks
 
 nTransferring
 
 nUnsubmitted
 

Detailed Description

Class holds job statistics for several Crab tasks.

This class saves and updates statistics from a given list of CrabTask objects.

Definition at line 620 of file crabFunctions.py.

Constructor & Destructor Documentation

def crabFunctions.TaskStats.__init__ (   self,
  tasklist = None 
)

The object constructor.

self: TaskStats

Parameters
selfThe object pointer. tasklist: List of CrabTask objects
tasklist(Optional) List of CrabTasks for which statistics should be calculated

Definition at line 628 of file crabFunctions.py.

References crabFunctions.TaskStats.clearStats(), and crabFunctions.TaskStats.updateStats().

628  def __init__(self, tasklist = None):
629  if tasklist is not None:
630  self.updateStats(tasklist)
631  else:
632  self.clearStats()
633 
def __init__(self, tasklist=None)
The object constructor.
def clearStats(self)
This function sets all counts to zero.
def updateStats(self, tasklist)
This function updates the statistics for a given tasklist.

Member Function Documentation

def crabFunctions.TaskStats.clearStats (   self)

This function sets all counts to zero.

self: TaskStats

Parameters
selfThe object pointer.

Definition at line 658 of file crabFunctions.py.

References crabFunctions.TaskStats.nTasks.

Referenced by crabFunctions.TaskStats.__init__(), and crabFunctions.TaskStats.updateStats().

def crabFunctions.TaskStats.updateStats (   self,
  tasklist 
)

This function updates the statistics for a given tasklist.

self: TaskStats

Parameters
selfThe object pointer. tasklist: List of CrabTask objects
tasklistList of CrabTasks for which statistics should be calculated

Definition at line 640 of file crabFunctions.py.

References crabFunctions.TaskStats.clearStats().

Referenced by crabFunctions.TaskStats.__init__().

640  def updateStats(self,tasklist):
641  self.clearStats()
642  self.nTasks = len(tasklist)
643  for task in tasklist:
644  if not task.isUpdating:
645  self.nUnsubmitted += task.nUnsubmitted
646  self.nIdle += task.nIdle
647  self.nRunning += task.nRunning
648  self.nTransferring += task.nTransferring
649  self.nCooloff += task.nCooloff
650  self.nFailed += task.nFailed
651  self.nFinished += task.nFinished
652  self.nComplete += task.nComplete
653 
def clearStats(self)
This function sets all counts to zero.
def updateStats(self, tasklist)
This function updates the statistics for a given tasklist.

Member Data Documentation

crabFunctions.TaskStats.nComplete

Definition at line 667 of file crabFunctions.py.

crabFunctions.TaskStats.nCooloff

Definition at line 664 of file crabFunctions.py.

crabFunctions.TaskStats.nFailed

Definition at line 665 of file crabFunctions.py.

crabFunctions.TaskStats.nFinished

Definition at line 666 of file crabFunctions.py.

crabFunctions.TaskStats.nIdle

Definition at line 661 of file crabFunctions.py.

crabFunctions.TaskStats.nRunning

Definition at line 662 of file crabFunctions.py.

crabFunctions.TaskStats.nTasks

Definition at line 642 of file crabFunctions.py.

Referenced by crabFunctions.TaskStats.clearStats().

crabFunctions.TaskStats.nTransferring

Definition at line 663 of file crabFunctions.py.

crabFunctions.TaskStats.nUnsubmitted

Definition at line 660 of file crabFunctions.py.