diff options
Diffstat (limited to 'plot_ohead.py')
-rwxr-xr-x | plot_ohead.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/plot_ohead.py b/plot_ohead.py index 9d4913c..81b39a7 100755 --- a/plot_ohead.py +++ b/plot_ohead.py | |||
@@ -25,6 +25,7 @@ options = [ | |||
25 | choices=PLUGINS), | 25 | choices=PLUGINS), |
26 | o('-d', '--data', action='append', dest='data', type='choice', | 26 | o('-d', '--data', action='append', dest='data', type='choice', |
27 | choices=DATA), | 27 | choices=DATA), |
28 | o(None, '--prefix', action='store', dest='prefix'), | ||
28 | ] | 29 | ] |
29 | 30 | ||
30 | defaults = { | 31 | defaults = { |
@@ -41,6 +42,7 @@ defaults = { | |||
41 | 'plugins' : [], | 42 | 'plugins' : [], |
42 | 'master' : [], | 43 | 'master' : [], |
43 | 'data' : [], | 44 | 'data' : [], |
45 | 'prefix' : '', | ||
44 | } | 46 | } |
45 | 47 | ||
46 | 48 | ||
@@ -53,10 +55,21 @@ ev_name = { | |||
53 | 'CXS' : 'context-switching overhead', | 55 | 'CXS' : 'context-switching overhead', |
54 | } | 56 | } |
55 | 57 | ||
58 | plugin_name = { | ||
59 | 'GSN-EDF NO_CPU' : 'CEm', | ||
60 | 'GSN-EDF 3' : 'CE1', | ||
61 | 'G-EDF NO_CPU' : 'FEm', | ||
62 | 'G-EDF 3' : 'FE1', | ||
63 | 'GHQ-EDF NO_CPU' : 'HEm', | ||
64 | 'GQ-EDF NO_CPU' : 'CQm', | ||
65 | 'GQ-EDF 3' : 'CQ1', | ||
66 | } | ||
67 | |||
56 | def graph(plugin, master, event, wc): | 68 | def graph(plugin, master, event, wc): |
69 | name = "%s %s" % (plugin, master) | ||
57 | return ['%s.R-%s.%s.csv' % (plugin, master, event), 1, 3 if wc else 2, | 70 | return ['%s.R-%s.%s.csv' % (plugin, master, event), 1, 3 if wc else 2, |
58 | '%s %s %s %s' % (plugin, event, 'RM' if master != 'NO_CPU' else '', | 71 | '%s %s %s' % (plugin_name[name], ev_name[event], |
59 | 'WC' if wc else 'AVG')] | 72 | '(worst-case)' if wc else '(average)')] |
60 | 73 | ||
61 | class OheadPlotter(defapp.App): | 74 | class OheadPlotter(defapp.App): |
62 | def __init__(self): | 75 | def __init__(self): |
@@ -106,7 +119,7 @@ class OheadPlotter(defapp.App): | |||
106 | if (p != 'GHQ-EDF' or m == 'NO_CPU') and \ | 119 | if (p != 'GHQ-EDF' or m == 'NO_CPU') and \ |
107 | (p != 'GQ-EDF' or e != 'SEND_RESCHED'): | 120 | (p != 'GQ-EDF' or e != 'SEND_RESCHED'): |
108 | gs += [graph(p, m, e, wc)] | 121 | gs += [graph(p, m, e, wc)] |
109 | fname = '%s_%s' % (e, d) | 122 | fname = '%s%s_%s' % (self.options.prefix, e, d) |
110 | title = '%s %s' % ('worst-case' if wc else 'average-case' , ev_name[e]) | 123 | title = '%s %s' % ('worst-case' if wc else 'average-case' , ev_name[e]) |
111 | self.plot(gs, title=title, name=fname) | 124 | self.plot(gs, title=title, name=fname) |
112 | 125 | ||