summaryrefslogtreecommitdiff
path: root/git/test/performance/test_streams.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-04 13:48:29 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-04 13:48:29 +0100
commitc80d727e374321573bb00e23876a67c77ff466e3 (patch)
tree7590d6ae544eac56e83639d27e1f9013b38d8a4b /git/test/performance/test_streams.py
parent965a08c3f9f2fbd62691d533425c699c943cb865 (diff)
downloadgitpython-c80d727e374321573bb00e23876a67c77ff466e3.tar.gz
Bumped version, updated changelog, reduced code smell
There is more work to do though, as many imports are still incorrect. Also, there are still print statements
Diffstat (limited to 'git/test/performance/test_streams.py')
-rw-r--r--git/test/performance/test_streams.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/git/test/performance/test_streams.py b/git/test/performance/test_streams.py
index facf9eed..18f19db3 100644
--- a/git/test/performance/test_streams.py
+++ b/git/test/performance/test_streams.py
@@ -44,8 +44,9 @@ class TestObjDBPerformance(TestBigRepoR):
fsize_kib = os.path.getsize(db_file) / 1000
size_kib = size / 1000
- print >> sys.stderr, "Added %i KiB (filesize = %i KiB) of %s data to loose odb in %f s ( %f Write KiB / s)" % (
- size_kib, fsize_kib, desc, elapsed_add, size_kib / elapsed_add)
+ msg = "Added %i KiB (filesize = %i KiB) of %s data to loose odb in %f s ( %f Write KiB / s)"
+ msg %= (size_kib, fsize_kib, desc, elapsed_add, size_kib / elapsed_add)
+ print >> sys.stderr, msg
# reading all at once
st = time()
@@ -55,8 +56,9 @@ class TestObjDBPerformance(TestBigRepoR):
stream.seek(0)
assert shadata == stream.getvalue()
- print >> sys.stderr, "Read %i KiB of %s data at once from loose odb in %f s ( %f Read KiB / s)" % (
- size_kib, desc, elapsed_readall, size_kib / elapsed_readall)
+ msg = "Read %i KiB of %s data at once from loose odb in %f s ( %f Read KiB / s)"
+ msg %= (size_kib, desc, elapsed_readall, size_kib / elapsed_readall)
+ print >> sys.stderr, msg
# reading in chunks of 1 MiB
cs = 512 * 1000
@@ -99,8 +101,9 @@ class TestObjDBPerformance(TestBigRepoR):
# as its the same sha, we reuse our path
fsize_kib = os.path.getsize(db_file) / 1000
- print >> sys.stderr, "Added %i KiB (filesize = %i KiB) of %s data to using git-hash-object in %f s ( %f Write KiB / s)" % (
- size_kib, fsize_kib, desc, gelapsed_add, size_kib / gelapsed_add)
+ msg = "Added %i KiB (filesize = %i KiB) of %s data to using git-hash-object in %f s ( %f Write KiB / s)"
+ msg %= (size_kib, fsize_kib, desc, gelapsed_add, size_kib / gelapsed_add)
+ print >> sys.stderr, msg
# compare ...
print >> sys.stderr, "Git-Python is %f %% faster than git when adding big %s files" % (
@@ -126,8 +129,9 @@ class TestObjDBPerformance(TestBigRepoR):
break
# END read stream
gelapsed_readchunks = time() - st
- print >> sys.stderr, "Read %i KiB of %s data in %i KiB chunks from git-cat-file in %f s ( %f Read KiB / s)" % (
- size_kib, desc, cs_kib, gelapsed_readchunks, size_kib / gelapsed_readchunks)
+ msg = "Read %i KiB of %s data in %i KiB chunks from git-cat-file in %f s ( %f Read KiB / s)"
+ msg %= (size_kib, desc, cs_kib, gelapsed_readchunks, size_kib / gelapsed_readchunks)
+ print >> sys.stderr, msg
# compare
print >> sys.stderr, "Git-Python is %f %% faster than git when reading big %s files in chunks" % (