summaryrefslogtreecommitdiff
path: root/buildstream/_stream.py
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2019-01-18 17:20:42 +0000
committerJames Ennis <james.ennis@codethink.com>2019-01-21 10:17:15 +0000
commit1b2ccd66e84e685e8c3d515f5c0a234cb9e68a03 (patch)
tree578e0343b66d31155d891141f5d4911b78b11c24 /buildstream/_stream.py
parentc75953f7459b51ba336fd1de7a5aea8578a98a25 (diff)
downloadbuildstream-jennis/profiling_topics.tar.gz
_profile.py: Added a new profiling topic, load-selectionjennis/profiling_topics
profile_start() and profile_end() calls have been added to Stream.load_selection()
Diffstat (limited to 'buildstream/_stream.py')
-rw-r--r--buildstream/_stream.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/buildstream/_stream.py b/buildstream/_stream.py
index 62eff1d8b..26aa64548 100644
--- a/buildstream/_stream.py
+++ b/buildstream/_stream.py
@@ -32,6 +32,7 @@ from ._exceptions import StreamError, ImplError, BstError, set_last_task_error
from ._message import Message, MessageType
from ._scheduler import Scheduler, SchedStatus, TrackQueue, FetchQueue, BuildQueue, PullQueue, PushQueue
from ._pipeline import Pipeline, PipelineSelection
+from ._profile import Topics, profile_start, profile_end
from . import utils, _yaml, _site
from . import Scope, Consistency
@@ -106,10 +107,16 @@ class Stream():
def load_selection(self, targets, *,
selection=PipelineSelection.NONE,
except_targets=()):
+
+ profile_start(Topics.LOAD_SELECTION, "_".join(t.replace(os.sep, '-') for t in targets))
+
elements, _ = self._load(targets, (),
selection=selection,
except_targets=except_targets,
fetch_subprojects=False)
+
+ profile_end(Topics.LOAD_SELECTION, "_".join(t.replace(os.sep, '-') for t in targets))
+
return elements
# shell()