From fbfac3ea825a863400f7196750f016b6a6a0d48d Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Mon, 1 Jun 2009 08:58:39 -0700 Subject: appendix work --- plot_ohead.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'plot_ohead.py') 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 = [ choices=PLUGINS), o('-d', '--data', action='append', dest='data', type='choice', choices=DATA), + o(None, '--prefix', action='store', dest='prefix'), ] defaults = { @@ -41,6 +42,7 @@ defaults = { 'plugins' : [], 'master' : [], 'data' : [], + 'prefix' : '', } @@ -53,10 +55,21 @@ ev_name = { 'CXS' : 'context-switching overhead', } +plugin_name = { + 'GSN-EDF NO_CPU' : 'CEm', + 'GSN-EDF 3' : 'CE1', + 'G-EDF NO_CPU' : 'FEm', + 'G-EDF 3' : 'FE1', + 'GHQ-EDF NO_CPU' : 'HEm', + 'GQ-EDF NO_CPU' : 'CQm', + 'GQ-EDF 3' : 'CQ1', +} + def graph(plugin, master, event, wc): + name = "%s %s" % (plugin, master) return ['%s.R-%s.%s.csv' % (plugin, master, event), 1, 3 if wc else 2, - '%s %s %s %s' % (plugin, event, 'RM' if master != 'NO_CPU' else '', - 'WC' if wc else 'AVG')] + '%s %s %s' % (plugin_name[name], ev_name[event], + '(worst-case)' if wc else '(average)')] class OheadPlotter(defapp.App): def __init__(self): @@ -106,7 +119,7 @@ class OheadPlotter(defapp.App): if (p != 'GHQ-EDF' or m == 'NO_CPU') and \ (p != 'GQ-EDF' or e != 'SEND_RESCHED'): gs += [graph(p, m, e, wc)] - fname = '%s_%s' % (e, d) + fname = '%s%s_%s' % (self.options.prefix, e, d) title = '%s %s' % ('worst-case' if wc else 'average-case' , ev_name[e]) self.plot(gs, title=title, name=fname) -- cgit v1.2.2