blob: 10a3151d80d9872ad2462fca95c9376dbc79a98a [file] [log] [blame]
Yulia Portnovab0c977c2015-12-11 19:23:28 +02001import os.path
2
3
4import texttable
5
6
7from ..itest import TwoScriptTest
8
9
10class OmgTest(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 results = []
18
19 for res in data[0]:
20 results.append(float(res.raw_result))
21
22 totalt = sum(results)
23 totalms = int(100 * 2 * len(results) / totalt)
24 tab = texttable.Texttable(max_width=120)
25 tab.set_deco(tab.HEADER | tab.VLINES | tab.BORDER)
26 tab.header(["Bandwidth total"])
27 tab.add_row([totalms])
28 return tab.draw()