Belle II Software  release-05-01-25
Basf2CalculationQueueStatistics Class Reference
Inheritance diagram for Basf2CalculationQueueStatistics:
Collaboration diagram for Basf2CalculationQueueStatistics:

Public Member Functions

def __str__ (self)
 
def __repr__ (self)
 
def __init__ (self, statistics)
 

Public Attributes

 str
 The str representation.
 
 columns
 The list of StatisticsColumns.
 
 modules
 A list of dictionaries, each one with the same names as there are columns.
 

Detailed Description

As the ipython_handler_basf2 statistics is not pickable, we can not store it into the queue.
So we write a wrapper which unpacks the needed properties.

Definition at line 53 of file entities.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  statistics 
)
Initialize with the C++ statistics 

Definition at line 68 of file entities.py.

68  def __init__(self, statistics):
69  """ Initialize with the C++ statistics """
70  modules = []
71 
72  columns = [StatisticsColumn("name", "Name"),
73  StatisticsColumn("calls", "Calls"), StatisticsColumn("mem", "VMemory (MB)"),
74  StatisticsColumn("time", "Time (s)"), StatisticsColumn("eventtime", "Time (ms)/Call", True)]
75 
76  categories = [("INIT", statistics.INIT),
77  ("BEGIN_RUN", statistics.BEGIN_RUN),
78  ("EVENT", statistics.EVENT),
79  ("END_RUN", statistics.END_RUN),
80  ("TERM", statistics.TERM),
81  ("TOTAL", statistics.TOTAL)]
82 
83  for stats in statistics.modules:
84  modules.append(ModuleStatistics(stats, categories))
85 
86  modules.append(ModuleStatistics(statistics.get_global(), categories))
87 
88 
89  self.str = statistics()
90 
91  super().__init__(columns, modules)

Member Function Documentation

◆ __repr__()

def __repr__ (   self)
Make the repr behave like before 

Definition at line 64 of file entities.py.

◆ __str__()

def __str__ (   self)
Make the str behave like before 

Definition at line 60 of file entities.py.


The documentation for this class was generated from the following file: