mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2025-12-16 09:00:05 +01:00
added tests for asmbench import
This commit is contained in:
@@ -85,13 +85,32 @@ class TestDBInterface(unittest.TestCase):
|
||||
def test_ibench_import(self):
|
||||
# only check import without dumping the DB file (takes too much time)
|
||||
with open(self._find_file('ibench_import_x86.dat')) as input_file:
|
||||
entries = dbi._get_ibench_output(input_file, 'x86')
|
||||
input_data = input_file.readlines()
|
||||
entries = dbi._get_ibench_output(input_data, 'x86')
|
||||
self.assertEqual(len(entries), 3)
|
||||
for _, e in entries.items():
|
||||
self.assertIsNotNone(e['throughput'])
|
||||
self.assertIsNotNone(e['latency'])
|
||||
with open(self._find_file('ibench_import_aarch64.dat')) as input_file:
|
||||
entries = dbi._get_ibench_output(input_file, 'aarch64')
|
||||
input_data = input_file.readlines()
|
||||
entries = dbi._get_ibench_output(input_data, 'aarch64')
|
||||
self.assertEqual(len(entries), 4)
|
||||
for _, e in entries.items():
|
||||
self.assertIsNotNone(e['throughput'])
|
||||
self.assertIsNotNone(e['latency'])
|
||||
|
||||
def test_asmbench_import(self):
|
||||
# only check import without dumping the DB file (takes too much time)
|
||||
with open(self._find_file('asmbench_import_x86.dat')) as input_file:
|
||||
input_data = input_file.readlines()
|
||||
entries = dbi._get_asmbench_output(input_data, 'x86')
|
||||
self.assertEqual(len(entries), 3)
|
||||
for _, e in entries.items():
|
||||
self.assertIsNotNone(e['throughput'])
|
||||
self.assertIsNotNone(e['latency'])
|
||||
with open(self._find_file('asmbench_import_aarch64.dat')) as input_file:
|
||||
input_data = input_file.readlines()
|
||||
entries = dbi._get_asmbench_output(input_data, 'aarch64')
|
||||
self.assertEqual(len(entries), 4)
|
||||
for _, e in entries.items():
|
||||
self.assertIsNotNone(e['throughput'])
|
||||
|
||||
Reference in New Issue
Block a user