Skip to content

Commit

Permalink
Adds an introduction to the benchmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandBordage committed Feb 22, 2015
1 parent b01000b commit 3da5c92
Show file tree
Hide file tree
Showing 16 changed files with 5,239 additions and 5,208 deletions.
9 changes: 7 additions & 2 deletions benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ def write_conditions():
))

with io.open(os.path.join('benchmark', 'conditions.rst'), 'w') as f:
f.write('In this benchmark, a small database is generated, '
'and each test is executed %s times '
'under the following conditions:\n\n' % Benchmark.n)

def write_table_sep(char='='):
f.write(''.ljust(20, char) + ' ' + ''.ljust(50, char) + '\n')
write_table_sep()
Expand Down Expand Up @@ -112,8 +116,9 @@ def __exit__(self, exc_type, exc_val, exc_tb):


class Benchmark(object):
def __init__(self, n=20):
self.n = n
n = 20

def __init__(self):
self.data = []

def bench_once(self, context, num_queries, invalidate_before=False):
Expand Down
Loading

0 comments on commit 3da5c92

Please sign in to comment.