Records a duration of a specific run of the runnable.
(self, runnable, duration)
| 226 | self.errors.append(error) |
| 227 | |
| 228 | def AddRunnableDuration(self, runnable, duration): |
| 229 | """Records a duration of a specific run of the runnable.""" |
| 230 | if runnable.name not in self.runnables: |
| 231 | self.runnables[runnable.name] = { |
| 232 | 'graphs': runnable.graphs, |
| 233 | 'durations': [duration], |
| 234 | 'timeout': runnable.timeout, |
| 235 | } |
| 236 | else: |
| 237 | existing_entry = self.runnables[runnable.name] |
| 238 | assert runnable.timeout == existing_entry['timeout'] |
| 239 | assert runnable.graphs == existing_entry['graphs'] |
| 240 | existing_entry['durations'].append(duration) |
| 241 | |
| 242 | def ToDict(self): |
| 243 | return { |