MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / add_result

Method add_result

monai/utils/profiling.py:297–300  ·  view source on GitHub ↗

Add a result in a thread-safe manner to the internal results dictionary.

(self, result: ProfileResult)

Source from the content-addressed store, hash-verified

295 sys.settrace(None)
296
297 def add_result(self, result: ProfileResult) -> None:
298 """Add a result in a thread-safe manner to the internal results dictionary."""
299 with self.lock:
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."""

Callers 1

_read_thread_funcMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected