diff options
Diffstat (limited to 'config/config.example.py')
-rw-r--r-- | config/config.example.py | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/config/config.example.py b/config/config.example.py deleted file mode 100644 index 9f24097..0000000 --- a/config/config.example.py +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | from __future__ import print_function | ||
2 | import os | ||
3 | import sys | ||
4 | import itertools | ||
5 | |||
6 | ''' | ||
7 | These are paths to repository directories. | ||
8 | |||
9 | ''' | ||
10 | REPOS = {'liblitmus' : '/home/hermanjl/git/liblitmus', | ||
11 | 'sched_trace' : '/home/hermanjl/git/sched_trace', | ||
12 | 'ft_tools' : '/home/hermanjl/git/feather-trace-tools', | ||
13 | 'trace-cmd' : '/home/hermanjl/git/trace-cmd'} | ||
14 | |||
15 | BINS = {'rtspin' : '{}/rtspin'.format(REPOS['liblitmus']), | ||
16 | 'release' : '{}/release_ts'.format(REPOS['liblitmus']), | ||
17 | 'ftcat' : '{}/ftcat'.format(REPOS['ft_tools']), | ||
18 | 'ftsplit' : '{}/ft2csv'.format(REPOS['ft_tools']), | ||
19 | 'ftsort' : '{}/ftsort'.format(REPOS['ft_tools']), | ||
20 | 'st_trace' : '{}/st_trace'.format(REPOS['ft_tools']), | ||
21 | 'trace-cmd' : '{}/trace-cmd'.format(REPOS['trace-cmd']), | ||
22 | 'st_show' : '{}/st_show'.format(REPOS['sched_trace'])} | ||
23 | |||
24 | DEFAULTS = {'params_file' : 'params.py', | ||
25 | 'sched_file' : 'sched.py', | ||
26 | 'exps_file' : 'exps.py', | ||
27 | 'duration' : 10, | ||
28 | 'spin' : 'rtspin', | ||
29 | 'cycles' : 2000} | ||
30 | |||
31 | FILES = {'ft_data' : 'ft.bin', | ||
32 | 'linux_data' : 'trace.dat', | ||
33 | 'sched_data' : 'st-{}.bin', | ||
34 | 'log_data' : 'trace.slog',} | ||
35 | |||
36 | PARAMS = {'sched' : 'scheduler', | ||
37 | 'dur' : 'duration', | ||
38 | 'kernel': 'uname', | ||
39 | 'cycles' : 'cpu-frequency'} | ||
40 | |||
41 | SCHED_EVENTS = range(501, 513) | ||
42 | BASE_EVENTS = ['SCHED', 'RELEASE', 'SCHED2', 'TICK', 'CXS'] | ||
43 | ALL_EVENTS = ["%s_%s" % (e, t) for (e,t) in | ||
44 | itertools.product(BASE_EVENTS, ["START","END"])] | ||
45 | ALL_EVENTS += ['RELEASE_LATENCY'] | ||
46 | BASE_EVENTS += ['RELEASE_LATENCY'] | ||
47 | |||
48 | valid = True | ||
49 | for repo, loc in REPOS.items(): | ||
50 | if not os.path.isdir(loc): | ||
51 | valid = False | ||
52 | print("Cannot access repo '%s' at '%s'" % (repo, loc), file=sys.stderr) | ||
53 | for prog, loc in BINS.items(): | ||
54 | if not os.path.isfile(loc): | ||
55 | valid = False | ||
56 | print("Cannot access program '%s' at '%s'" % (prog, loc), file=sys.stderr) | ||
57 | if not valid: | ||
58 | print("Errors in config file", file=sys.stderr) | ||