Files
linux-kernel-module-cheat/bst-vs-heap
Ciro Santilli 六四事件 法轮功 85006363f8 test-user-mode: make perfect like build-userland
Multithreading and target selection.
2019-05-05 00:00:00 +00:00

32 lines
764 B
Python
Executable File

#!/usr/bin/env python3
import common
class Main(common.LkmcCliFunction):
def __init__(self):
super().__init__(
defaults={
'emulator': 'gem5',
'show_time': False,
},
description='''\
Convert a BST vs heap stat file into a gnuplot input
''',
)
def timed_main(self):
stats = self.get_stats()
it = iter(stats)
i = 1
for stat in it:
try:
next_stat = next(it)
except StopIteration:
# Automatic dumpstats at end may lead to odd number of stats.
break
print('{} {} {}'.format(i, stat, next_stat))
i += 1
if __name__ == '__main__':
Main().cli()