Accumulate a new instance of ProfileDatum. Args: profile_datum: (`ProfileDatum`) an instance of `ProfileDatum` to accumulate to this object.
(self, profile_datum)
| 80 | self._node_to_exec_count = {device_and_node: 1} |
| 81 | |
| 82 | def add(self, profile_datum): |
| 83 | """Accumulate a new instance of ProfileDatum. |
| 84 | |
| 85 | Args: |
| 86 | profile_datum: (`ProfileDatum`) an instance of `ProfileDatum` to |
| 87 | accumulate to this object. |
| 88 | """ |
| 89 | |
| 90 | self.total_op_time += profile_datum.op_time |
| 91 | self.total_exec_time += profile_datum.exec_time |
| 92 | device_and_node = "%s:%s" % (profile_datum.device_name, |
| 93 | profile_datum.node_exec_stats.node_name) |
| 94 | |
| 95 | device_and_node = "%s:%s" % (profile_datum.device_name, |
| 96 | profile_datum.node_exec_stats.node_name) |
| 97 | if device_and_node in self._node_to_exec_count: |
| 98 | self._node_to_exec_count[device_and_node] += 1 |
| 99 | else: |
| 100 | self._node_to_exec_count[device_and_node] = 1 |
| 101 | |
| 102 | @property |
| 103 | def node_count(self): |
no outgoing calls