From da64d9a01ee3c563a73e922dd2ac752d4011aa9b Mon Sep 17 00:00:00 2001 From: Christopher Kenna Date: Thu, 20 Sep 2012 16:37:26 -0400 Subject: Allow experiment configuration to contain trailing whitespace. By default, vim adds a trailing newline to the end of files, while Emacs does not. This causes problems when editing experiments with vim. --- run_exps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): def load_schedule(fname): with open(fname, 'r') as f: - data = f.read() + data = f.read().strip() try: schedule = eval(data) except: -- cgit v1.2.2 From a863f97842f305fedc5c6c151cef1ca9f7c7b992 Mon Sep 17 00:00:00 2001 From: Christopher Kenna Date: Thu, 20 Sep 2012 16:41:17 -0400 Subject: Fix example configuration. Jonathan accidentally gave the full path to ftcat. Also, add a bit of documentation. --- config/config.example.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 import os import sys +""" +These are paths to repository directories. + +""" REPOS = {'liblitmus' : '/home/hermanjl/git/liblitmus', 'sched_trace' : '/home/hermanjl/git/sched_trace', 'analysis' : '/home/hermanjl/git/overhead-analysis-cjk', - 'ft_tools' : '/home/hermanjl/git/ft_tools/ftcat', + 'ft_tools' : '/home/hermanjl/git/feather-trace-tools', 'trace-cmd' : '/home/hermanjl/git/trace-cmd'} BINS = {'bespin' : '{}/bespin'.format(REPOS['liblitmus']), -- cgit v1.2.2 From 5cbcbfa61aede7acbf68d9c17cd0723fba21b1c3 Mon Sep 17 00:00:00 2001 From: Christopher Kenna Date: Thu, 20 Sep 2012 16:43:11 -0400 Subject: Ignore and do not version control the configuration file. The configuration file is different per-user. We don't want to keep it under version control. --- .gitignore | 3 ++- config/config.py | 46 ---------------------------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 config/config.py diff --git a/.gitignore b/.gitignore index 7c62cf4..5d257d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ +config/config.py *~ \#*# *.pyc -.ropeproject* \ No newline at end of file +.ropeproject* 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 @@ -from __future__ import print_function -import os -import sys - -REPOS = {'liblitmus' : '/home/hermanjl/git/liblitmus', - 'sched_trace' : '/home/hermanjl/git/sched_trace', - 'analysis' : '/home/hermanjl/git/overhead-analysis-cjk', - 'ft_tools' : '/home/hermanjl/git/ft_tools/ftcat', - 'trace-cmd' : '/home/hermanjl/git/trace-cmd'} - -BINS = {'bespin' : '{}/bespin'.format(REPOS['liblitmus']), - 'colorspin' : '{}/colorspin'.format(REPOS['liblitmus']), - 'rtspin' : '{}/rtspin'.format(REPOS['liblitmus']), - 'release' : '{}/release_ts'.format(REPOS['liblitmus']), - 'ftcat' : '{}/ftcat'.format(REPOS['ft_tools']), - 'st_trace' : '{}/st_trace'.format(REPOS['ft_tools']), - 'split' : '{}/split'.format(REPOS['analysis']), - 'sort' : '{}/sort-all'.format(REPOS['analysis']), - 'analyze' : '{}/analyze'.format(REPOS['analysis']), - 'trace-cmd' : '{}/trace-cmd'.format(REPOS['trace-cmd'])} - -DEFAULTS = {'params_file' : 'params.py', - 'sched_file' : 'sched.py', - 'exps_file' : 'exps.py', - 'duration' : '10', - 'spin' : 'rtspin'} - -FILES = {'ft_data' : 'ft.bin', - 'linux_data' : 'trace.dat', - 'sched_data' : 'st-{}.bin', - 'log_data' : 'trace.slog'} - -PARAMS = {'sched' : 'scheduler', - 'dur' : 'duration'} - -valid = True -for repo, loc in REPOS.items(): - if not os.path.isdir(loc): - valid = False - print("Cannot access repo '%s' at '%s'" % (repo, loc), file=sys.stderr) -for prog, loc in BINS.items(): - if not os.path.isfile(loc): - valid = False - print("Cannot access program '%s' at '%s'" % (prog, loc), file=sys.stderr) -if not valid: - print("Errors in config file", file=sys.stderr) -- cgit v1.2.2