9 Dictionary list holding the module statistics (like the C++ class ModuleStatistics)
13 """Create a new module statistics entity."""
34 Call the function on each information in the categories and return a dict
35 name -> function(value)
37 return {name: function(category)
for name, category
in categories}
40 """Convenience function for the display."""
44 return self.
calls[
"EVENT"]
48 return np.round(self.
time_sum[
"EVENT"] * 1E-9, 2)
49 elif item ==
"eventtime":
50 return np.round(self.
time_mean[
"EVENT"] * 1E-6, 2),
"±", np.round(self.
time_stddev[
"EVENT"] * 1E-6, 2)
56 As the ipython_handler_basf2 statistics is not pickable, we can not store it into the queue.
57 So we write a wrapper which unpacks the needed properties.
61 """ Make the str behave like before """
65 """ Make the repr behave like before """
69 """ Initialize with the C++ statistics """
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)]
83 for stats
in statistics.modules:
89 self.
str = statistics()