summaryrefslogtreecommitdiff
path: root/git/test/performance/test_streams.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2014-11-19 12:16:44 +0100
committerSebastian Thiel <byronimo@gmail.com>2014-11-19 12:16:44 +0100
commit257264743154b975bc156f425217593be14727a9 (patch)
tree755ccbe76bc225ef237264e1b45bcb17202087ec /git/test/performance/test_streams.py
parent4d9b7b09a7c66e19a608d76282eacc769e349150 (diff)
downloadgitpython-257264743154b975bc156f425217593be14727a9.tar.gz
Applied autopep8
Commandline was autopep8 -j 8 --max-line-length 120 --in-place --recursive --exclude "*gitdb*,*async*" git/
Diffstat (limited to 'git/test/performance/test_streams.py')
-rw-r--r--git/test/performance/test_streams.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/git/test/performance/test_streams.py b/git/test/performance/test_streams.py
index e42867a3..7800144d 100644
--- a/git/test/performance/test_streams.py
+++ b/git/test/performance/test_streams.py
@@ -14,7 +14,7 @@ from gitdb.test.lib import make_memory_file
from lib import (
TestBigRepoR
- )
+)
class TestObjDBPerformance(TestBigRepoR):
@@ -45,7 +45,8 @@ 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)
+ 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)
# reading all at once
st = time()
@@ -55,7 +56,8 @@ 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)
+ 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)
# reading in chunks of 1 MiB
cs = 512 * 1000
@@ -74,7 +76,8 @@ class TestObjDBPerformance(TestBigRepoR):
assert ''.join(chunks) == stream.getvalue()
cs_kib = cs / 1000
- print >> sys.stderr, "Read %i KiB of %s data in %i KiB chunks from loose odb in %f s ( %f Read KiB / s)" % (size_kib, desc, cs_kib, elapsed_readchunks, size_kib / elapsed_readchunks)
+ print >> sys.stderr, "Read %i KiB of %s data in %i KiB chunks from loose odb in %f s ( %f Read KiB / s)" % (
+ size_kib, desc, cs_kib, elapsed_readchunks, size_kib / elapsed_readchunks)
# del db file so git has something to do
os.remove(db_file)
@@ -97,19 +100,23 @@ 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)
+ 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)
# compare ...
- print >> sys.stderr, "Git-Python is %f %% faster than git when adding big %s files" % (100.0 - (elapsed_add / gelapsed_add) * 100, desc)
+ print >> sys.stderr, "Git-Python is %f %% faster than git when adding big %s files" % (
+ 100.0 - (elapsed_add / gelapsed_add) * 100, desc)
# read all
st = time()
s, t, size, data = rwrepo.git.get_object_data(gitsha)
gelapsed_readall = time() - st
- print >> sys.stderr, "Read %i KiB of %s data at once using git-cat-file in %f s ( %f Read KiB / s)" % (size_kib, desc, gelapsed_readall, size_kib / gelapsed_readall)
+ print >> sys.stderr, "Read %i KiB of %s data at once using git-cat-file in %f s ( %f Read KiB / s)" % (
+ size_kib, desc, gelapsed_readall, size_kib / gelapsed_readall)
# compare
- print >> sys.stderr, "Git-Python is %f %% faster than git when reading big %sfiles" % (100.0 - (elapsed_readall / gelapsed_readall) * 100, desc)
+ print >> sys.stderr, "Git-Python is %f %% faster than git when reading big %sfiles" % (
+ 100.0 - (elapsed_readall / gelapsed_readall) * 100, desc)
# read chunks
st = time()
@@ -120,8 +127,10 @@ 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)
+ 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)
# compare
- print >> sys.stderr, "Git-Python is %f %% faster than git when reading big %s files in chunks" % (100.0 - (elapsed_readchunks / gelapsed_readchunks) * 100, desc)
+ print >> sys.stderr, "Git-Python is %f %% faster than git when reading big %s files in chunks" % (
+ 100.0 - (elapsed_readchunks / gelapsed_readchunks) * 100, desc)
# END for each randomization factor