[Yum-devel] [PATCH] add verifytransaction time output - so we can know how long it is taking

Seth Vidal skvidal at fedoraproject.org
Tue Aug 3 19:11:41 UTC 2010


---
 yum/__init__.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/yum/__init__.py b/yum/__init__.py
index 6196e7a..3f87f50 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1408,7 +1408,8 @@ class YumBase(depsolve.Depsolve):
         #    that there is not also an install of this pkg in the tsInfo (reinstall)
         # for any kind of install add from_repo to the yumdb, and the cmdline
         # and the install reason
-
+        
+        vt_st = time.time()
         self.rpmdb.dropCachedData()
         self.plugins.run('preverifytrans')
         for txmbr in self.tsInfo:
@@ -1494,6 +1495,7 @@ class YumBase(depsolve.Depsolve):
             self.plugins.run('historyend')
             self.history.end(self.rpmdb.simpleVersion(main_only=True)[0], ret)
         self.rpmdb.dropCachedData()
+        self.verbose_logger.debug('VerifyTransaction time: %0.3f' % (time.time() - vt_st))
 
     def costExcludePackages(self):
         """ Create an excluder for repos. with higher cost. Eg.
-- 
1.7.2



More information about the Yum-devel mailing list