Get a fresh results dictionary containing fresh tuples of ProfileResult objects.
(self)
| 300 | self.results[result.name].append(result) |
| 301 | |
| 302 | def get_results(self): |
| 303 | """Get a fresh results dictionary containing fresh tuples of ProfileResult objects.""" |
| 304 | if not self._is_parent(): |
| 305 | raise RuntimeError("Only parent process can collect results") |
| 306 | |
| 307 | with self.lock: |
| 308 | return {k: tuple(v) for k, v in self.results.items()} |
| 309 | |
| 310 | @contextmanager |
| 311 | def profile_ctx(self, name, caller=None): |