diff options
author | kuzmich321 <kuzmich321@yandex-team.com> | 2023-12-07 19:32:44 +0300 |
---|---|---|
committer | kuzmich321 <kuzmich321@yandex-team.com> | 2023-12-07 20:27:28 +0300 |
commit | 60c5bab7719a615a823e99c0bc8e41cf4b03b443 (patch) | |
tree | 15d758a815c949cc0cb146ba4e88eb1e3534e51f | |
parent | 154fc21683f37e62d4369d304c9072e39081ebb2 (diff) | |
download | ydb-60c5bab7719a615a823e99c0bc8e41cf4b03b443.tar.gz |
import tracing: tid removed from event key
-rw-r--r-- | library/python/import_tracing/lib/import_tracer.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/library/python/import_tracing/lib/import_tracer.py b/library/python/import_tracing/lib/import_tracer.py index 39dfc11bc9..ad2391708b 100644 --- a/library/python/import_tracing/lib/import_tracer.py +++ b/library/python/import_tracing/lib/import_tracer.py @@ -11,10 +11,9 @@ class ImportTracer: self.start_time = time.time() def start_event(self, modname, filename, tid=None): - tid = tid if tid is not None else threading.current_thread().ident + tid = tid if tid is not None else threading.current_thread().name time_from_start = self._get_current_time_from_start() - event_key = (modname, tid) new_event = events.Event( modname=modname, filename=filename, @@ -23,13 +22,10 @@ class ImportTracer: end_time=None, ) - self.events[event_key] = new_event + self.events[modname] = new_event def finish_event(self, modname, filename, tid=None): - tid = tid if tid is not None else threading.current_thread().ident - event_key = (modname, tid) - event = self.events[event_key] - + event = self.events[modname] end_time = self._get_current_time_from_start() event.end_time = end_time |