Belle II Software development
Basf2CalculationQueueStatistics Class Reference
Inheritance diagram for Basf2CalculationQueueStatistics:
Statistics

Public Member Functions

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

Public Attributes

 str
 The str representation.
 

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 60 of file entities.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from Statistics.

Definition at line 75 of file entities.py.

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

Member Function Documentation

◆ __repr__()

def __repr__ (   self)
 Make the repr behave like before 

Definition at line 71 of file entities.py.

71 def __repr__(self):
72 """ Make the repr behave like before """
73 return self.str
74

◆ __str__()

def __str__ (   self)
 Make the str behave like before 

Definition at line 67 of file entities.py.

67 def __str__(self):
68 """ Make the str behave like before """
69 return self.str
70

Member Data Documentation

◆ str

str

The str representation.

Definition at line 96 of file entities.py.


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