summaryrefslogtreecommitdiff
path: root/git/test/performance
diff options
context:
space:
mode:
authorAntoine Musso <hashar@free.fr>2014-11-16 21:09:47 +0100
committerAntoine Musso <hashar@free.fr>2014-11-16 21:09:47 +0100
commitc8e70749887370a99adeda972cc3503397b5f9a7 (patch)
tree38e1241fd6d756f783b6b56dc6628ac3ca41ed4f /git/test/performance
parentbed3b0989730cdc3f513884325f1447eb378aaee (diff)
downloadgitpython-c8e70749887370a99adeda972cc3503397b5f9a7.tar.gz
pep8 linting (trailing whitespace)
W291 trailing whitespace
Diffstat (limited to 'git/test/performance')
-rw-r--r--git/test/performance/lib.py6
-rw-r--r--git/test/performance/test_commit.py12
-rw-r--r--git/test/performance/test_streams.py10
-rw-r--r--git/test/performance/test_utils.py4
4 files changed, 16 insertions, 16 deletions
diff --git a/git/test/performance/lib.py b/git/test/performance/lib.py
index 28500da4..00d41b76 100644
--- a/git/test/performance/lib.py
+++ b/git/test/performance/lib.py
@@ -30,11 +30,11 @@ def resolve_or_fail(env_var):
#} END utilities
-#{ Base Classes
+#{ Base Classes
class TestBigRepoR(TestBase):
- """TestCase providing access to readonly 'big' repositories using the following
+ """TestCase providing access to readonly 'big' repositories using the following
member variables:
* gitrorepo
@@ -49,7 +49,7 @@ class TestBigRepoR(TestBase):
#{ Invariants
head_sha_2k = '235d521da60e4699e5bd59ac658b5b48bd76ddca'
head_sha_50 = '32347c375250fd470973a5d76185cac718955fd5'
- #} END invariants
+ #} END invariants
@classmethod
def setUp(cls):
diff --git a/git/test/performance/test_commit.py b/git/test/performance/test_commit.py
index adee2567..009b3d82 100644
--- a/git/test/performance/test_commit.py
+++ b/git/test/performance/test_commit.py
@@ -32,8 +32,8 @@ class TestPerformance(TestBigRepoRW):
no = 0
nc = 0
- # find the first commit containing the given path - always do a full
- # iteration ( restricted to the path in question ), but in fact it should
+ # find the first commit containing the given path - always do a full
+ # iteration ( restricted to the path in question ), but in fact it should
# return quite a lot of commits, we just take one and hence abort the operation
st = time()
@@ -46,7 +46,7 @@ class TestPerformance(TestBigRepoRW):
# END for each object
# END for each commit
elapsed_time = time() - st
- print >> sys.stderr, "Traversed %i Trees and a total of %i unchached objects in %s [s] ( %f objs/s )" % (nc, no, elapsed_time, no / elapsed_time)
+ print >> sys.stderr, "Traversed %i Trees and a total of %i unchached objects in %s [s] ( %f objs/s )" % (nc, no, elapsed_time, no / elapsed_time)
def test_commit_traversal(self):
# bound to cat-file parsing performance
@@ -83,9 +83,9 @@ class TestPerformance(TestBigRepoRW):
nc = 5000
st = time()
for i in xrange(nc):
- cm = Commit(rwrepo, Commit.NULL_BIN_SHA, hc.tree,
- hc.author, hc.authored_date, hc.author_tz_offset,
- hc.committer, hc.committed_date, hc.committer_tz_offset,
+ cm = Commit(rwrepo, Commit.NULL_BIN_SHA, hc.tree,
+ hc.author, hc.authored_date, hc.author_tz_offset,
+ hc.committer, hc.committed_date, hc.committer_tz_offset,
str(i), parents=hc.parents, encoding=hc.encoding)
stream = StringIO()
diff --git a/git/test/performance/test_streams.py b/git/test/performance/test_streams.py
index 32ae98bf..e42867a3 100644
--- a/git/test/performance/test_streams.py
+++ b/git/test/performance/test_streams.py
@@ -36,7 +36,7 @@ class TestObjDBPerformance(TestBigRepoR):
elapsed = time() - st
print >> sys.stderr, "Done (in %f s)" % elapsed
- # writing - due to the compression it will seem faster than it is
+ # writing - due to the compression it will seem faster than it is
st = time()
binsha = ldb.store(IStream('blob', size, stream)).binsha
elapsed_add = time() - st
@@ -79,7 +79,7 @@ class TestObjDBPerformance(TestBigRepoR):
# del db file so git has something to do
os.remove(db_file)
- # VS. CGIT
+ # VS. CGIT
##########
# CGIT ! Can using the cgit programs be faster ?
proc = rwrepo.git.hash_object('-w', '--stdin', as_process=True, istream=subprocess.PIPE)
@@ -99,7 +99,7 @@ class TestObjDBPerformance(TestBigRepoR):
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)
- # compare ...
+ # compare ...
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
@@ -108,7 +108,7 @@ class TestObjDBPerformance(TestBigRepoR):
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)
- # compare
+ # compare
print >> sys.stderr, "Git-Python is %f %% faster than git when reading big %sfiles" % (100.0 - (elapsed_readall / gelapsed_readall) * 100, desc)
# read chunks
@@ -122,6 +122,6 @@ class TestObjDBPerformance(TestBigRepoR):
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)
- # compare
+ # 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)
# END for each randomization factor
diff --git a/git/test/performance/test_utils.py b/git/test/performance/test_utils.py
index 19c37a5f..c8d397fb 100644
--- a/git/test/performance/test_utils.py
+++ b/git/test/performance/test_utils.py
@@ -60,7 +60,7 @@ class TestUtilPerformance(TestBigRepoR):
elapsed = time() - st
na = ni * 3
print >> sys.stderr, "Accessed %s[x] %i times in %s s ( %f acc / s)" % (cls.__name__, na, elapsed, na / elapsed)
- # END for each sequence
+ # END for each sequence
def test_instantiation(self):
ni = 100000
@@ -138,7 +138,7 @@ class TestUtilPerformance(TestBigRepoR):
yield i
# END slow iter - be closer to the real world
- # alloc doesn't play a role here it seems
+ # alloc doesn't play a role here it seems
for ni in (500, 1000, 10000, 20000, 40000):
st = time()
for i in list(xrange(ni)):