diff options
author | Christopher Kenna <cjk@cs.unc.edu> | 2011-10-12 03:40:22 -0400 |
---|---|---|
committer | Christopher Kenna <cjk@cs.unc.edu> | 2011-10-12 03:40:22 -0400 |
commit | d872b11d85b3a502864d566c9dbae1fe1c37eb9a (patch) | |
tree | 0e27387f8042ccc46a0ae90cd2c1107d6a7c9a29 /plot_rtas12.py | |
parent | eed568c195c27338aa4c06c60bf3b824d63d2565 (diff) |
correct plotting error
Diffstat (limited to 'plot_rtas12.py')
-rwxr-xr-x | plot_rtas12.py | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/plot_rtas12.py b/plot_rtas12.py index 5942a88..aeba823 100755 --- a/plot_rtas12.py +++ b/plot_rtas12.py | |||
@@ -80,38 +80,37 @@ def set_plot_opts(p): | |||
80 | ] | 80 | ] |
81 | 81 | ||
82 | 82 | ||
83 | def plot_release(data_dir): | 83 | def plot_release(data_dir, ycol, title, fname): |
84 | p = Plot() | 84 | p = Plot() |
85 | p.output = '{0}/overhead=RELEASE.pdf'.format(data_dir) | 85 | p.output = '{0}/{1}'.format(data_dir, fname) |
86 | p.format = 'pdf' | 86 | p.format = 'pdf' |
87 | 87 | ||
88 | for rel_type in ['RELEASE', 'LVLA-RELEASE']: | 88 | for o_type in ['RELEASE', 'LVLA-RELEASE']: |
89 | for sched in SCHEDULERS: | 89 | for sched in SCHEDULERS: |
90 | fname = '{0}/scheduler={1}_overhead={2}.csv'.format(data_dir, sched, rel_type) | 90 | fname = '{0}/scheduler={1}_overhead={2}.csv'.format(data_dir, sched, o_type) |
91 | ti = '{0}{1}'.format(get_sched_title(sched), get_overhead_title(rel_type)) | 91 | ti = '{0}{1}'.format(get_sched_title(sched), get_overhead_title(o_type)) |
92 | p.curves += [curve(fname=fname, xcol=gnuplot_col('n_tasks'), | 92 | p.curves += [curve(fname=fname, xcol=gnuplot_col('n_tasks'), |
93 | ycol=gnuplot_col('avg'), title=ti)] | 93 | ycol=ycol, title=ti)] |
94 | p.xlabel = 'number of tasks' | 94 | p.xlabel = 'number of tasks' |
95 | p.ylabel = 'overhead (microseconds)' | 95 | p.ylabel = 'overhead (microseconds)' |
96 | p.title = 'release overheads' | 96 | p.title = title |
97 | set_plot_opts(p) | 97 | set_plot_opts(p) |
98 | p.gnuplot_exec() | 98 | p.gnuplot_exec() |
99 | 99 | ||
100 | def plot_sched(data_dir): | 100 | def plot_sched(data_dir, ycol, title, fname): |
101 | p = Plot() | 101 | p = Plot() |
102 | p.output = '{0}/overhead=SCHED.pdf'.format(data_dir) | 102 | p.output = '{0}/{1}'.format(data_dir, fname) |
103 | p.format = 'pdf' | 103 | p.format = 'pdf' |
104 | p.key = 'top left' | ||
105 | 104 | ||
106 | for sched_type in ['SCHED', 'LVLA-SCHED']: | 105 | for o_type in ['SCHED', 'LVLA-SCHED']: |
107 | for sched in SCHEDULERS: | 106 | for sched in SCHEDULERS: |
108 | fname = '{0}/scheduler={1}_overhead=SCHED.csv'.format(data_dir, sched) | 107 | fname = '{0}/scheduler={1}_overhead={2}.csv'.format(data_dir, sched, o_type) |
109 | ti = '{0}{1}'.format(get_sched_title(sched), get_overhead_title(sched_type)) | 108 | ti = '{0}{1}'.format(get_sched_title(sched), get_overhead_title(o_type)) |
110 | p.curves += [curve(fname=fname, xcol=gnuplot_col('n_tasks'), | 109 | p.curves += [curve(fname=fname, xcol=gnuplot_col('n_tasks'), |
111 | ycol=gnuplot_col('avg'), title=ti)] | 110 | ycol=ycol, title=ti)] |
112 | p.xlabel = 'number of tasks' | 111 | p.xlabel = 'number of tasks' |
113 | p.ylabel = 'overhead (microseconds)' | 112 | p.ylabel = 'overhead (microseconds)' |
114 | p.title = 'scheduling overheads' | 113 | p.title = title |
115 | set_plot_opts(p) | 114 | set_plot_opts(p) |
116 | p.gnuplot_exec() | 115 | p.gnuplot_exec() |
117 | 116 | ||
@@ -121,8 +120,10 @@ def main(): | |||
121 | usage('missing args') | 120 | usage('missing args') |
122 | 121 | ||
123 | data_dir = sys.argv[1] | 122 | data_dir = sys.argv[1] |
124 | plot_sched(data_dir) | 123 | plot_sched(data_dir, gnuplot_col('max'), 'worst case scheduling overhead', 'overhead=SCHED_type=MAX.pdf') |
125 | plot_release(data_dir) | 124 | plot_release(data_dir, gnuplot_col('max'), 'worst case release overhead', 'overhead=RELEASE_type=MAX.pdf') |
125 | plot_sched(data_dir, gnuplot_col('avg'), 'average scheduling overhead', 'overhead=SCHED_type=AVG.pdf') | ||
126 | plot_release(data_dir, gnuplot_col('avg'), 'average release overhead', 'overhead=RELEASE_type=AVG.pdf') | ||
126 | 127 | ||
127 | if __name__ == '__main__': | 128 | if __name__ == '__main__': |
128 | main() | 129 | main() |