Skip to content

Commit

Permalink
Merge f0c6703 into ba16b05
Browse files Browse the repository at this point in the history
  • Loading branch information
foresmac committed Feb 28, 2014
2 parents ba16b05 + f0c6703 commit f54a1de
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/bench.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import os
import time

Expand Down Expand Up @@ -80,13 +79,11 @@ def benchmark_discount(text):
]

print('Parsing the Markdown Syntax document %d times...' % loops)
for i, method in enumerate(methods):
name = method[0]
fn = method[1]
for name, fn in methods:
try:
total = 0
for nth in range(0, loops):
for i in range(loops):
total += fn(text)
print('%s: %gs' % (name, total))
print('{0}: {1}'.format(name, total))
except ImportError:
print('%s is not available' % name)
print('{0} is not available'.format(name))

0 comments on commit f54a1de

Please sign in to comment.