allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [3/3] allura git commit: [#7882] log timings
Date Tue, 02 Jun 2015 16:03:23 GMT
[#7882] log timings


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/90da7b3c
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/90da7b3c
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/90da7b3c

Branch: refs/heads/master
Commit: 90da7b3c58076f85fbd6752e81770d5cfc68354d
Parents: de12442
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Tue Jun 2 15:59:46 2015 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Tue Jun 2 15:59:46 2015 +0000

----------------------------------------------------------------------
 ForgeGit/forgegit/model/git_repo.py | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/90da7b3c/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index d08fe1f..416db33 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -22,6 +22,7 @@ import logging
 import tempfile
 from datetime import datetime
 from contextlib import contextmanager
+from time import time
 
 import tg
 import git
@@ -635,8 +636,10 @@ class GitImplementation(M.RepositoryImplementation):
     @contextmanager
     def _shared_clone(self, from_path):
         tmp_path = tempfile.mkdtemp()
+        start_time = time()
         self._git.git.clone('--bare', '--shared', from_path, tmp_path)
         tmp_repo = GitImplementation(Object(full_fs_path=tmp_path))
+        log.info('Merge request view - shared clone timing: %s for %s', time()-start_time,
from_path)
         yield tmp_repo
         shutil.rmtree(tmp_path, ignore_errors=True)
 


Mime
View raw message