summaryrefslogtreecommitdiff
path: root/git/test/performance
diff options
context:
space:
mode:
authorAntoine Musso <hashar@free.fr>2014-11-16 20:51:04 +0100
committerAntoine Musso <hashar@free.fr>2014-11-16 20:51:21 +0100
commitbe34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6 (patch)
tree7d0124054760421d95a6f675d8e843e42a72ad82 /git/test/performance
parentf5d11b750ecc982541d1f936488248f0b42d75d3 (diff)
downloadgitpython-be34ec23c48d6d5d8fd2ef4491981f6fb4bab8e6.tar.gz
pep8 linting (blank lines expectations)
E301 expected 1 blank line, found 0 E302 expected 2 blank lines, found 1 E303 too many blank lines (n)
Diffstat (limited to 'git/test/performance')
-rw-r--r--git/test/performance/lib.py2
-rw-r--r--git/test/performance/test_commit.py1
-rw-r--r--git/test/performance/test_streams.py4
-rw-r--r--git/test/performance/test_utils.py4
4 files changed, 7 insertions, 4 deletions
diff --git a/git/test/performance/lib.py b/git/test/performance/lib.py
index acf2e4d5..28500da4 100644
--- a/git/test/performance/lib.py
+++ b/git/test/performance/lib.py
@@ -33,6 +33,7 @@ def resolve_or_fail(env_var):
#{ Base Classes
class TestBigRepoR(TestBase):
+
"""TestCase providing access to readonly 'big' repositories using the following
member variables:
@@ -59,6 +60,7 @@ class TestBigRepoR(TestBase):
class TestBigRepoRW(TestBigRepoR):
+
"""As above, but provides a big repository that we can write to.
Provides ``self.gitrwrepo`` and ``self.puregitrwrepo``"""
diff --git a/git/test/performance/test_commit.py b/git/test/performance/test_commit.py
index c3d89931..79555844 100644
--- a/git/test/performance/test_commit.py
+++ b/git/test/performance/test_commit.py
@@ -12,6 +12,7 @@ from cStringIO import StringIO
from time import time
import sys
+
class TestPerformance(TestBigRepoRW):
# ref with about 100 commits in its history
diff --git a/git/test/performance/test_streams.py b/git/test/performance/test_streams.py
index cac53a06..c8b59da6 100644
--- a/git/test/performance/test_streams.py
+++ b/git/test/performance/test_streams.py
@@ -44,7 +44,6 @@ class TestObjDBPerformance(TestBigRepoR):
db_file = ldb.readable_db_object_path(bin_to_hex(binsha))
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)
@@ -58,7 +57,6 @@ class TestObjDBPerformance(TestBigRepoR):
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)
-
# reading in chunks of 1 MiB
cs = 512*1000
chunks = list()
@@ -104,7 +102,6 @@ class TestObjDBPerformance(TestBigRepoR):
# 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
st = time()
s, t, size, data = rwrepo.git.get_object_data(gitsha)
@@ -114,7 +111,6 @@ class TestObjDBPerformance(TestBigRepoR):
# 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
st = time()
s, t, size, stream = rwrepo.git.stream_object_data(gitsha)
diff --git a/git/test/performance/test_utils.py b/git/test/performance/test_utils.py
index 7de77970..4979eaa1 100644
--- a/git/test/performance/test_utils.py
+++ b/git/test/performance/test_utils.py
@@ -14,20 +14,24 @@ class TestUtilPerformance(TestBigRepoR):
# compare dict vs. slot access
class Slotty(object):
__slots__ = "attr"
+
def __init__(self):
self.attr = 1
class Dicty(object):
+
def __init__(self):
self.attr = 1
class BigSlotty(object):
__slots__ = ('attr', ) + tuple('abcdefghijk')
+
def __init__(self):
for attr in self.__slots__:
setattr(self, attr, 1)
class BigDicty(object):
+
def __init__(self):
for attr in BigSlotty.__slots__:
setattr(self, attr, 1)