diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-23 17:48:04 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-23 17:48:04 +0900 |
commit | 1e47e02b84202159a99b7d61a736e85d0a184123 (patch) | |
tree | 9d526a47f583f57515bb8f8c442395da273286ad /buildstream/_loader.py | |
parent | af8842b446819a51e315153af8f826b45de90315 (diff) | |
download | buildstream-1e47e02b84202159a99b7d61a736e85d0a184123.tar.gz |
_loader.py: Use the profiler for profiling parts of the load sequence
Diffstat (limited to 'buildstream/_loader.py')
-rwxr-xr-x | buildstream/_loader.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/buildstream/_loader.py b/buildstream/_loader.py index ac25f4b0e..8e5b31dda 100755 --- a/buildstream/_loader.py +++ b/buildstream/_loader.py @@ -28,6 +28,7 @@ from ._yaml import CompositePolicy, CompositeTypeError, CompositeOverrideError from ._metaelement import MetaElement from ._metasource import MetaSource +from ._profile import Topics, profile_start, profile_end ################################################# @@ -410,22 +411,30 @@ class Loader(): # First pass, recursively load files and populate our table of LoadElements # + profile_start(Topics.LOAD_PROJECT, self.target_filename) self.load_file(self.target_filename) + profile_end(Topics.LOAD_PROJECT, self.target_filename) # # Deal with variants # + profile_start(Topics.VARIANTS, self.target_filename) self.resolve_variants() + profile_end(Topics.VARIANTS, self.target_filename) # # Now that we've resolve the dependencies, scan them for circular dependencies # + profile_start(Topics.CIRCULAR_CHECK, self.target_filename) self.check_circular_deps(self.target) + profile_end(Topics.CIRCULAR_CHECK, self.target_filename) # # Sort direct dependencies of elements by their dependency ordering # + profile_start(Topics.SORT_DEPENDENCIES, self.target_filename) self.sort_dependencies(self.target) + profile_end(Topics.SORT_DEPENDENCIES, self.target_filename) # Finally, wrap what we have into LoadElements and return the target # |