16 Dictionary list holding the module statistics (like the C++ class ModuleStatistics)
20 """Create a new module statistics entity."""
41 Call the function on each information in the categories
and return a dict
42 name -> function(value)
44 return {name: function(category)
for name, category
in categories}
47 """Convenience function for the display."""
51 return self.
calls[
"EVENT"]
55 return np.round(self.
time_sum[
"EVENT"] * 1E-9, 2)
56 elif item ==
"eventtime":
57 return np.round(self.
time_mean[
"EVENT"] * 1E-6, 2),
"±", np.round(self.
time_stddev[
"EVENT"] * 1E-6, 2)
63 As the ipython_handler_basf2 statistics is not pickable, we can
not store it into the queue.
64 So we write a wrapper which unpacks the needed properties.
68 """ Make the str behave like before """
72 """ Make the repr behave like before """
76 """ Initialize with the C++ statistics """
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)]
90 for stats
in statistics.modules:
96 self.
str = statistics()