mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
18 lines
460 B
Python
Executable File
18 lines
460 B
Python
Executable File
#!/usr/bin/env python3
|
|
import common
|
|
parser = common.get_argparse(
|
|
argparse_args={'description':'Convert a BST vs heap stat file into a gnuplot input'}
|
|
)
|
|
args = common.setup(parser)
|
|
stats = common.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
|