koder aka kdanilov | 4af1c1d | 2015-05-18 15:48:58 +0300 | [diff] [blame] | 1 | import os.path |
| 2 | |
| 3 | |
| 4 | import texttable |
| 5 | |
| 6 | |
| 7 | from ..itest import TwoScriptTest |
| 8 | |
| 9 | |
| 10 | class PgBenchTest(TwoScriptTest): |
| 11 | root = os.path.dirname(__file__) |
| 12 | pre_run_script = os.path.join(root, "prepare.sh") |
| 13 | run_script = os.path.join(root, "run.sh") |
| 14 | |
| 15 | @classmethod |
| 16 | def format_for_console(cls, data): |
| 17 | tab = texttable.Texttable(max_width=120) |
| 18 | tab.set_deco(tab.HEADER | tab.VLINES | tab.BORDER) |
| 19 | tab.header(["TpmC"]) |
| 20 | tab.add_row([data['res']['TpmC']]) |
| 21 | return tab.draw() |