diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-04 17:22:08 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-04 17:22:08 +0200 |
commit | e746f96bcc29238b79118123028ca170adc4ff0f (patch) | |
tree | efa61d7735d41c4fa42ddec952886332654d3b63 /test/git/performance/test_streams.py | |
parent | a1e80445ad5cb6da4c0070d7cb8af89da3b0803b (diff) | |
download | gitpython-e746f96bcc29238b79118123028ca170adc4ff0f.tar.gz |
Fixed implementation after design change to deal with it - all tests run, but next there will have to be more through testing
Diffstat (limited to 'test/git/performance/test_streams.py')
-rw-r--r-- | test/git/performance/test_streams.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/git/performance/test_streams.py b/test/git/performance/test_streams.py index 30fd8048..01ec9fc4 100644 --- a/test/git/performance/test_streams.py +++ b/test/git/performance/test_streams.py @@ -1,7 +1,7 @@ """Performance data streaming performance""" from test.testlib import * -from git.odb.db import * +from git.odb import * from array import array from cStringIO import StringIO @@ -51,7 +51,7 @@ class TestObjDBPerformance(TestBigRepoR): # writing - due to the compression it will seem faster than it is st = time() - sha = ldb.store('blob', size, stream) + sha = ldb.store(IStream('blob', size, stream)).sha elapsed_add = time() - st assert ldb.has_object(sha) db_file = ldb.readable_db_object_path(sha) @@ -63,8 +63,8 @@ class TestObjDBPerformance(TestBigRepoR): # reading all at once st = time() - type, size, shastream = ldbstreamsha) - shadata = shastream.read() + ostream = ldb.stream(sha) + shadata = ostream.read() elapsed_readall = time() - st stream.seek(0) @@ -76,9 +76,9 @@ class TestObjDBPerformance(TestBigRepoR): cs = 512*1000 chunks = list() st = time() - type, size, shastream = ldbstreamsha) + ostream = ldb.stream(sha) while True: - data = shastream.read(cs) + data = ostream.read(cs) chunks.append(data) if len(data) < cs: break |