diff options
| author | hermanjl <thegoldenbee@gmail.com> | 2012-09-20 17:55:34 -0400 |
|---|---|---|
| committer | hermanjl <thegoldenbee@gmail.com> | 2012-09-20 17:55:34 -0400 |
| commit | 5da63680873bece99b9e99c80bcbf8d9f7d792b3 (patch) | |
| tree | 6a00ccf3c2e04b3b92c686273f2bc133ac4d881d | |
| parent | 48e1c8de6f8fca6770b669f8dae1ddc52917bead (diff) | |
| parent | 5cbcbfa61aede7acbf68d9c17cd0723fba21b1c3 (diff) | |
Merge pull request #4 from ckenna/wip-cjk
Various fixes to color-scripts.
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | config/config.example.py | 6 | ||||
| -rw-r--r-- | config/config.py | 46 | ||||
| -rwxr-xr-x | run_exps.py | 2 |
4 files changed, 8 insertions, 49 deletions
| @@ -1,4 +1,5 @@ | |||
| 1 | config/config.py | ||
| 1 | *~ | 2 | *~ |
| 2 | \#*# | 3 | \#*# |
| 3 | *.pyc | 4 | *.pyc |
| 4 | .ropeproject* \ No newline at end of file | 5 | .ropeproject* |
diff --git a/config/config.example.py b/config/config.example.py index 5176460..b307687 100644 --- a/config/config.example.py +++ b/config/config.example.py | |||
| @@ -2,10 +2,14 @@ from __future__ import print_function | |||
| 2 | import os | 2 | import os |
| 3 | import sys | 3 | import sys |
| 4 | 4 | ||
| 5 | """ | ||
| 6 | These are paths to repository directories. | ||
| 7 | |||
| 8 | """ | ||
| 5 | REPOS = {'liblitmus' : '/home/hermanjl/git/liblitmus', | 9 | REPOS = {'liblitmus' : '/home/hermanjl/git/liblitmus', |
| 6 | 'sched_trace' : '/home/hermanjl/git/sched_trace', | 10 | 'sched_trace' : '/home/hermanjl/git/sched_trace', |
| 7 | 'analysis' : '/home/hermanjl/git/overhead-analysis-cjk', | 11 | 'analysis' : '/home/hermanjl/git/overhead-analysis-cjk', |
| 8 | 'ft_tools' : '/home/hermanjl/git/ft_tools/ftcat', | 12 | 'ft_tools' : '/home/hermanjl/git/feather-trace-tools', |
| 9 | 'trace-cmd' : '/home/hermanjl/git/trace-cmd'} | 13 | 'trace-cmd' : '/home/hermanjl/git/trace-cmd'} |
| 10 | 14 | ||
| 11 | BINS = {'bespin' : '{}/bespin'.format(REPOS['liblitmus']), | 15 | BINS = {'bespin' : '{}/bespin'.format(REPOS['liblitmus']), |
diff --git a/config/config.py b/config/config.py deleted file mode 100644 index 5176460..0000000 --- a/config/config.py +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | from __future__ import print_function | ||
| 2 | import os | ||
| 3 | import sys | ||
| 4 | |||
| 5 | REPOS = {'liblitmus' : '/home/hermanjl/git/liblitmus', | ||
| 6 | 'sched_trace' : '/home/hermanjl/git/sched_trace', | ||
| 7 | 'analysis' : '/home/hermanjl/git/overhead-analysis-cjk', | ||
| 8 | 'ft_tools' : '/home/hermanjl/git/ft_tools/ftcat', | ||
| 9 | 'trace-cmd' : '/home/hermanjl/git/trace-cmd'} | ||
| 10 | |||
| 11 | BINS = {'bespin' : '{}/bespin'.format(REPOS['liblitmus']), | ||
| 12 | 'colorspin' : '{}/colorspin'.format(REPOS['liblitmus']), | ||
| 13 | 'rtspin' : '{}/rtspin'.format(REPOS['liblitmus']), | ||
| 14 | 'release' : '{}/release_ts'.format(REPOS['liblitmus']), | ||
| 15 | 'ftcat' : '{}/ftcat'.format(REPOS['ft_tools']), | ||
| 16 | 'st_trace' : '{}/st_trace'.format(REPOS['ft_tools']), | ||
| 17 | 'split' : '{}/split'.format(REPOS['analysis']), | ||
| 18 | 'sort' : '{}/sort-all'.format(REPOS['analysis']), | ||
| 19 | 'analyze' : '{}/analyze'.format(REPOS['analysis']), | ||
| 20 | 'trace-cmd' : '{}/trace-cmd'.format(REPOS['trace-cmd'])} | ||
| 21 | |||
| 22 | DEFAULTS = {'params_file' : 'params.py', | ||
| 23 | 'sched_file' : 'sched.py', | ||
| 24 | 'exps_file' : 'exps.py', | ||
| 25 | 'duration' : '10', | ||
| 26 | 'spin' : 'rtspin'} | ||
| 27 | |||
| 28 | FILES = {'ft_data' : 'ft.bin', | ||
| 29 | 'linux_data' : 'trace.dat', | ||
| 30 | 'sched_data' : 'st-{}.bin', | ||
| 31 | 'log_data' : 'trace.slog'} | ||
| 32 | |||
| 33 | PARAMS = {'sched' : 'scheduler', | ||
| 34 | 'dur' : 'duration'} | ||
| 35 | |||
| 36 | valid = True | ||
| 37 | for repo, loc in REPOS.items(): | ||
| 38 | if not os.path.isdir(loc): | ||
| 39 | valid = False | ||
| 40 | print("Cannot access repo '%s' at '%s'" % (repo, loc), file=sys.stderr) | ||
| 41 | for prog, loc in BINS.items(): | ||
| 42 | if not os.path.isfile(loc): | ||
| 43 | valid = False | ||
| 44 | print("Cannot access program '%s' at '%s'" % (prog, loc), file=sys.stderr) | ||
| 45 | if not valid: | ||
| 46 | print("Errors in config file", file=sys.stderr) | ||
diff --git a/run_exps.py b/run_exps.py index bc15b98..a2d5077 100755 --- a/run_exps.py +++ b/run_exps.py | |||
| @@ -117,7 +117,7 @@ def load_params(fname): | |||
| 117 | 117 | ||
| 118 | def load_schedule(fname): | 118 | def load_schedule(fname): |
| 119 | with open(fname, 'r') as f: | 119 | with open(fname, 'r') as f: |
| 120 | data = f.read() | 120 | data = f.read().strip() |
| 121 | try: | 121 | try: |
| 122 | schedule = eval(data) | 122 | schedule = eval(data) |
| 123 | except: | 123 | except: |
