-
-
Notifications
You must be signed in to change notification settings - Fork 617
Expand file tree
/
Copy pathgem5-stat
More file actions
executable file
·26 lines (22 loc) · 604 Bytes
/
gem5-stat
File metadata and controls
executable file
·26 lines (22 loc) · 604 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python3
import common
class Main(common.LkmcCliFunction):
def __init__(self):
super().__init__(
defaults={
'show_time': False,
},
description='''\
Get the value of a gem5 stat from the stats.txt file.
''',
)
self.add_argument(
'stat',
help='Python regexp matching the full stat name of interest',
nargs='?',
)
def timed_main(self):
stats = self.get_stats(self.env['stat'])
print('\n'.join(stats))
if __name__ == '__main__':
Main().cli()