summaryrefslogtreecommitdiff
path: root/test/git/performance/test_utils.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-04 17:22:08 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-04 17:22:08 +0200
commite746f96bcc29238b79118123028ca170adc4ff0f (patch)
treeefa61d7735d41c4fa42ddec952886332654d3b63 /test/git/performance/test_utils.py
parenta1e80445ad5cb6da4c0070d7cb8af89da3b0803b (diff)
downloadgitpython-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_utils.py')
-rw-r--r--test/git/performance/test_utils.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/git/performance/test_utils.py b/test/git/performance/test_utils.py
index 47366d34..76adffec 100644
--- a/test/git/performance/test_utils.py
+++ b/test/git/performance/test_utils.py
@@ -42,3 +42,18 @@ class TestUtilPerformance(TestBigRepoR):
elapsed = time() - st
print >> sys.stderr, "Accessed %s.attr %i times in %s s ( %f acc / s)" % (cls.__name__, ni, elapsed, ni / elapsed)
# END for each class type
+
+ # check num of sequence-acceses
+ for cls in (list, tuple):
+ x = 10
+ st = time()
+ s = cls(range(x))
+ for i in xrange(ni):
+ s[0]
+ s[1]
+ s[2]
+ # END for
+ 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