diff options
Diffstat (limited to 'buildstream/_project.py')
-rw-r--r-- | buildstream/_project.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py index f5da960cf..7a1734a25 100644 --- a/buildstream/_project.py +++ b/buildstream/_project.py @@ -30,7 +30,7 @@ from . import _cachekey from . import _site from . import _yaml from ._artifactelement import ArtifactElement -from ._profile import Topics, profile_start, profile_end +from ._profile import Topics, PROFILER from ._exceptions import LoadError, LoadErrorReason from ._options import OptionPool from ._artifactcache import ArtifactCache @@ -156,9 +156,8 @@ class Project(): self._fully_loaded = False self._project_includes = None - profile_start(Topics.LOAD_PROJECT, self.directory.replace(os.sep, '-')) - self._load(parent_loader=parent_loader) - profile_end(Topics.LOAD_PROJECT, self.directory.replace(os.sep, '-')) + with PROFILER.profile(Topics.LOAD_PROJECT, self.directory.replace(os.sep, '-')): + self._load(parent_loader=parent_loader) self._partially_loaded = True |