Additional profiling in Gather.add_initial_packages().

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Daniel Mach 2016-04-06 06:17:06 -04:00 committed by Lubomír Sedlář
parent 5a2c4f5e0f
commit 321d471125

View File

@ -337,6 +337,7 @@ class Gather(GatherBase):
exclude = set() exclude = set()
for pattern in excludes: for pattern in excludes:
with Profiler("Gather.add_initial_packages():exclude"):
# TODO: debug, source # TODO: debug, source
if pattern.endswith(".+"): if pattern.endswith(".+"):
pkgs = self.q_multilib_binary_packages.filter_autoglob(name=pattern[:-2]) pkgs = self.q_multilib_binary_packages.filter_autoglob(name=pattern[:-2])
@ -356,6 +357,7 @@ class Gather(GatherBase):
self.init_query_cache() self.init_query_cache()
for pattern in includes: for pattern in includes:
with Profiler("Gather.add_initial_packages():include"):
if pattern == "system-release" and self.opts.greedy_method == "all": if pattern == "system-release" and self.opts.greedy_method == "all":
pkgs = self.q_binary_packages.filter(provides=hawkey.Reldep(self.dnf.sack, "system-release")).apply() pkgs = self.q_binary_packages.filter(provides=hawkey.Reldep(self.dnf.sack, "system-release")).apply()
else: else:
@ -375,6 +377,7 @@ class Gather(GatherBase):
if self.opts.greedy_method == "build": if self.opts.greedy_method == "build":
for pkg in added.copy(): for pkg in added.copy():
with Profiler("Gather.add_initial_packages():greedy-build"):
prov = hawkey.Reldep(self.dnf._sack, pkg.name) prov = hawkey.Reldep(self.dnf._sack, pkg.name)
if pkg in self.q_native_binary_packages: if pkg in self.q_native_binary_packages:
greedy_build_packages = self.q_native_binary_packages.filter(sourcerpm=pkg.sourcerpm, provides=prov) greedy_build_packages = self.q_native_binary_packages.filter(sourcerpm=pkg.sourcerpm, provides=prov)