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 621 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 629 of file crabFunctions.py.

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

629  def __init__(self, tasklist = None):
630  if tasklist is not None:
631  self.updateStats(tasklist)
632  else:
633  self.clearStats()
634 
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 659 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 641 of file crabFunctions.py.

References crabFunctions.TaskStats.clearStats().

Referenced by crabFunctions.TaskStats.__init__().

641  def updateStats(self,tasklist):
642  self.clearStats()
643  self.nTasks = len(tasklist)
644  for task in tasklist:
645  if not task.isUpdating:
646  self.nUnsubmitted += task.nUnsubmitted
647  self.nIdle += task.nIdle
648  self.nRunning += task.nRunning
649  self.nTransferring += task.nTransferring
650  self.nCooloff += task.nCooloff
651  self.nFailed += task.nFailed
652  self.nFinished += task.nFinished
653  self.nComplete += task.nComplete
654 
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 668 of file crabFunctions.py.

crabFunctions.TaskStats.nCooloff

Definition at line 665 of file crabFunctions.py.

crabFunctions.TaskStats.nFailed

Definition at line 666 of file crabFunctions.py.

crabFunctions.TaskStats.nFinished

Definition at line 667 of file crabFunctions.py.

crabFunctions.TaskStats.nIdle

Definition at line 662 of file crabFunctions.py.

crabFunctions.TaskStats.nRunning

Definition at line 663 of file crabFunctions.py.

crabFunctions.TaskStats.nTasks

Definition at line 643 of file crabFunctions.py.

Referenced by crabFunctions.TaskStats.clearStats().

crabFunctions.TaskStats.nTransferring

Definition at line 664 of file crabFunctions.py.

crabFunctions.TaskStats.nUnsubmitted

Definition at line 661 of file crabFunctions.py.