Skip to content

Commit

Permalink
Fix formatting of table
Browse files Browse the repository at this point in the history
  • Loading branch information
axiak committed Jul 23, 2010
1 parent 1110247 commit c3dbbac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ XML file. I'm running them multiple times, being careful to use the ``timeit`` m
To see more details, please see the `performance script <http://github.com/axiak/pyre2/tree/master/tests/performance.py>`_.

+-----------------+---------------------------------------------------------------------------+------------+--------------+---------------+------------+
|Test |Description |# total runs|``re`` time(s)|``re2`` time(s)|% total time
|Test |Description |# total runs|``re`` time(s)|``re2`` time(s)|% total time|
+=================+===========================================================================+============+==============+===============+============+
|Findall URI|Email|Find list of '([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?|([^ @]+)@([^ @]+)'|2 |21.672 |0.318 |1.47%
|Findall URI|Email|Find list of '([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?|([^ @]+)@([^ @]+)'|2 |21.672 |0.318 |1.47% |
+-----------------+---------------------------------------------------------------------------+------------+--------------+---------------+------------+
|Replace WikiLinks|This test replaces links of the form [[Obama|Barack_Obama]] to Obama. |100 |17.271 |3.399 |19.68%
|Replace WikiLinks|This test replaces links of the form [[Obama|Barack_Obama]] to Obama. |100 |17.271 |3.399 |19.68% |
+-----------------+---------------------------------------------------------------------------+------------+--------------+---------------+------------+
|Remove WikiLinks |This test splits the data by the <page> tag. |100 |15.820 |1.479 |9.35%
|Remove WikiLinks |This test splits the data by the <page> tag. |100 |15.820 |1.479 |9.35% |
+-----------------+---------------------------------------------------------------------------+------------+--------------+---------------+------------+

Feel free to add more speed tests to the bottom of the script and send a pull request my way!
Expand Down
2 changes: 1 addition & 1 deletion tests/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def benchmarks_to_ReST(benchmarks):
def print_divider(symbol='-'):
print '+' + '+'.join(symbol*col_size for col_size in col_sizes) + '+'
def print_row(row):
print '|' + '|'.join(item.ljust(col_sizes[i]) for i, item in enumerate(row))
print '|' + '|'.join(item.ljust(col_sizes[i]) for i, item in enumerate(row)) + '|'

print_divider()
print_row(table[0])
Expand Down

0 comments on commit c3dbbac

Please sign in to comment.