You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/04 07:35:55 UTC
[buildstream] 16/17: Add profile topic for subprocessed stream
method
This is an automated email from the ASF dual-hosted git repository.
tvb pushed a commit to branch tpollard/buildsubprocess
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 5c8a716a04fcb0c36ec5b6ac0669e2a1b2c7ac6d
Author: Tom Pollard <to...@codethink.co.uk>
AuthorDate: Thu Nov 7 17:10:33 2019 +0000
Add profile topic for subprocessed stream method
---
src/buildstream/_profile.py | 1 +
src/buildstream/_stream.py | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/buildstream/_profile.py b/src/buildstream/_profile.py
index 0219e83..2620d82 100644
--- a/src/buildstream/_profile.py
+++ b/src/buildstream/_profile.py
@@ -48,6 +48,7 @@ class Topics:
LOAD_PIPELINE = "load-pipeline"
LOAD_SELECTION = "load-selection"
SCHEDULER = "scheduler"
+ SUBPROCESS = "subprocess"
ALL = "all"
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index 24e0a1d..ebabcac 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -142,7 +142,8 @@ class Stream:
pickling_support.install()
with _signals.blocked([signal.SIGINT, signal.SIGTERM, signal.SIGTSTP], ignore=True):
try:
- func(*args, **kwargs)
+ with PROFILER.profile(Topics.SUBPROCESS, "stream"):
+ func(*args, **kwargs)
except Exception as e: # pylint: disable=broad-except
notify.put(Notification(NotificationType.EXCEPTION, exception=SubprocessException(e)))