diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-07-07 19:34:25 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-07-07 19:34:25 +0200 |
commit | 8b3b222565199eab67196a5ab840b9e2770bfc53 (patch) | |
tree | 8d203ba8a38f420eadbba2415df88b00d4a19a20 | |
parent | 4bb5107cff6f205f5c6e73a6f8bd22fc56f48cf4 (diff) | |
download | gitpython-8b3b222565199eab67196a5ab840b9e2770bfc53.tar.gz |
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
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | git/db/dulwich/complex.py | 7 | ||||
-rw-r--r-- | git/test/performance/db/test_looseodb_dulwich.py | 6 | ||||
-rw-r--r-- | git/test/performance/db/test_odb_dulwich.py | 6 |
4 files changed, 19 insertions, 1 deletions
@@ -6,3 +6,4 @@ /dist /doc/_build nbproject +.nosebazinga diff --git a/git/db/dulwich/complex.py b/git/db/dulwich/complex.py index 6c3645a4..3fa7c1cd 100644 --- a/git/db/dulwich/complex.py +++ b/git/db/dulwich/complex.py @@ -26,7 +26,12 @@ class DulwichGitODB(PureGitODB): def __init__(self, objects_root): """Initalize this instance""" PureGitODB.__init__(self, objects_root) - self._dw_repo = DulwichRepo(self.working_dir) + if hasattr(self, 'working_dir'): + wd = self.working_dir + else: + wd = os.path.dirname(os.path.dirname(objects_root)) + #END try to figure out good entry for dulwich, which doesn't do an extensive search + self._dw_repo = DulwichRepo(wd) def __getattr__(self, attr): try: diff --git a/git/test/performance/db/test_looseodb_dulwich.py b/git/test/performance/db/test_looseodb_dulwich.py new file mode 100644 index 00000000..cf27a528 --- /dev/null +++ b/git/test/performance/db/test_looseodb_dulwich.py @@ -0,0 +1,6 @@ +from git.db.dulwich.complex import DulwichGitODB +from looseodb_impl import TestLooseDBWPerformanceBase + +class TestPureLooseDB(TestLooseDBWPerformanceBase): + LooseODBCls = DulwichGitODB + diff --git a/git/test/performance/db/test_odb_dulwich.py b/git/test/performance/db/test_odb_dulwich.py new file mode 100644 index 00000000..069c5b43 --- /dev/null +++ b/git/test/performance/db/test_odb_dulwich.py @@ -0,0 +1,6 @@ +from git.db.dulwich.complex import DulwichCompatibilityGitDB +from odb_impl import TestObjDBPerformanceBase + +class TestPureDB(TestObjDBPerformanceBase): + RepoCls = DulwichCompatibilityGitDB + |