Skip to content

Commit 8b3b222

Browse files
committed
Added default performance tests - these should help to measure something at least, which implicitly includes pack handling. For the pack specific tests to work, one would need a pack interface though, which is currently not planned to be specifically exposed
1 parent 4bb5107 commit 8b3b222

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/dist
77
/doc/_build
88
nbproject
9+
.nosebazinga

git/db/dulwich/complex.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ class DulwichGitODB(PureGitODB):
2626
def __init__(self, objects_root):
2727
"""Initalize this instance"""
2828
PureGitODB.__init__(self, objects_root)
29-
self._dw_repo = DulwichRepo(self.working_dir)
29+
if hasattr(self, 'working_dir'):
30+
wd = self.working_dir
31+
else:
32+
wd = os.path.dirname(os.path.dirname(objects_root))
33+
#END try to figure out good entry for dulwich, which doesn't do an extensive search
34+
self._dw_repo = DulwichRepo(wd)
3035

3136
def __getattr__(self, attr):
3237
try:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from git.db.dulwich.complex import DulwichGitODB
2+
from looseodb_impl import TestLooseDBWPerformanceBase
3+
4+
class TestPureLooseDB(TestLooseDBWPerformanceBase):
5+
LooseODBCls = DulwichGitODB
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from git.db.dulwich.complex import DulwichCompatibilityGitDB
2+
from odb_impl import TestObjDBPerformanceBase
3+
4+
class TestPureDB(TestObjDBPerformanceBase):
5+
RepoCls = DulwichCompatibilityGitDB
6+

0 commit comments

Comments
 (0)