def plot_cache_hits_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): if 'NO_CACHE' in strategies: strategies.remove('NO_CACHE') desc = {} desc['title'] = 'Cache hit ratio: T=%s C=%s' % (topology, cache_size) desc['ylabel'] = 'Cache hit ratio' desc['xlabel'] = u'Content distribution \u03b1' desc['xparam'] = ('workload', 'alpha') desc['xvals'] = alpha_range desc['filter'] = { 'topology': { 'name': topology }, 'cache_placement': { 'network_cache': cache_size } } desc['ymetrics'] = [('CACHE_HIT_RATIO', 'MEAN')] * len(strategies) desc['ycondnames'] = [('strategy', 'name')] * len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper left' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'CACHE_HIT_RATIO_T=%s@C=%s.pdf' % (topology, cache_size), plotdir)
def plot_path_stretch_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): if 'NO_CACHE' in strategies: strategies.remove('NO_CACHE') desc = {} desc['title'] = 'Path Stretch: T=%s C=%s' % (topology, cache_size) desc['ylabel'] = 'Path Stretch' desc['xlabel'] = 'Alpha' desc['xparam'] = ('workload', 'alpha') desc['xvals'] = alpha_range desc['filter'] = { 'topology': { 'name': topology }, 'cache_placement': { 'network_cache': cache_size } } desc['ymetrics'] = [('PATH_STRETCH', 'MEAN_CONTENT')] * len(strategies) desc['ycondnames'] = [('strategy', 'name')] * len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper left' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'PATH_STRETCH_T=%s@C=%s.pdf' % (topology, cache_size), plotdir)
def plot_cache_hits_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): if "NO_CACHE" in strategies: strategies.remove("NO_CACHE") desc = {} desc["title"] = "Cache hit ratio: T={} C={}".format(topology, cache_size) desc["ylabel"] = "Cache hit ratio" desc["xlabel"] = "Content distribution \u03b1" desc["xparam"] = ("workload", "alpha") desc["xvals"] = alpha_range desc["filter"] = { "topology": { "name": topology }, "cache_placement": { "network_cache": cache_size }, } desc["ymetrics"] = [("CACHE_HIT_RATIO", "MEAN")] * len(strategies) desc["ycondnames"] = [("strategy", "name")] * len(strategies) desc["ycondvals"] = strategies desc["errorbar"] = True desc["legend_loc"] = "upper left" desc["line_style"] = STRATEGY_STYLE desc["legend"] = STRATEGY_LEGEND desc["plotempty"] = PLOT_EMPTY_GRAPHS plot_lines( resultset, desc, "CACHE_HIT_RATIO_T={}@C={}.pdf".format(topology, cache_size), plotdir, )
def plot_latency_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): desc = {} desc["title"] = "Latency: T={} C={}".format(topology, cache_size) desc["xlabel"] = "Content distribution \u03b1" desc["ylabel"] = "Latency (ms)" desc["xparam"] = ("workload", "alpha") desc["xvals"] = alpha_range desc["filter"] = { "topology": { "name": topology }, "cache_placement": { "network_cache": cache_size }, } desc["ymetrics"] = [("LATENCY", "MEAN")] * len(strategies) desc["ycondnames"] = [("strategy", "name")] * len(strategies) desc["ycondvals"] = strategies desc["errorbar"] = True desc["legend_loc"] = "upper right" desc["line_style"] = STRATEGY_STYLE desc["legend"] = STRATEGY_LEGEND desc["plotempty"] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, "LATENCY_T={}@C={}.pdf".format(topology, cache_size), plotdir)
def plot_latency_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} desc["title"] = "Latency: T={} A={}".format(topology, alpha) desc["xlabel"] = "Cache to population ratio" desc["ylabel"] = "Latency" desc["xscale"] = "log" desc["xparam"] = ("cache_placement", "network_cache") desc["xvals"] = cache_size_range desc["filter"] = { "topology": { "name": topology }, "workload": { "name": "STATIONARY", "alpha": alpha }, } desc["ymetrics"] = [("LATENCY", "MEAN")] * len(strategies) desc["ycondnames"] = [("strategy", "name")] * len(strategies) desc["ycondvals"] = strategies desc["metric"] = ("LATENCY", "MEAN") desc["errorbar"] = True desc["legend_loc"] = "upper right" desc["line_style"] = STRATEGY_STYLE desc["legend"] = STRATEGY_LEGEND desc["plotempty"] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, "LATENCY_T={}@A={}.pdf".format(topology, alpha), plotdir)
def plot_cache_hits_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} if 'NO_CACHE' in strategies: strategies.remove('NO_CACHE') desc['title'] = 'Cache hit ratio: T=%s A=%s' % (topology, alpha) desc['xlabel'] = u'Cache to population ratio' desc['ylabel'] = 'Cache hit ratio' desc['xscale'] = 'log' desc['xparam'] = ('cache_placement', 'network_cache') desc['xvals'] = cache_size_range desc['filter'] = { 'topology': { 'name': topology }, 'workload': { 'name': 'STATIONARY', 'alpha': alpha } } desc['ymetrics'] = [('CACHE_HIT_RATIO', 'MEAN')] * len(strategies) desc['ycondnames'] = [('strategy', 'name')] * len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper left' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'CACHE_HIT_RATIO_T=%s@A=%s.jpg' % (topology, alpha), plotdir)
def plot_latency_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): desc = {} desc['title'] = 'Latency: T=%s C=%s' % (topology, cache_size) desc['xlabel'] = u'Content distribution \u03b1' desc['ylabel'] = 'Latency (ms)' desc['xparam'] = ('workload', 'alpha') desc['xvals'] = alpha_range desc['filter'] = { 'topology': { 'name': topology }, 'cache_placement': { 'network_cache': cache_size } } desc['ymetrics'] = [('LATENCY', 'MEAN')] * len(strategies) desc['ycondnames'] = [('strategy', 'name')] * len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper right' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'LATENCY_T=%s@C=%s.pdf' % (topology, cache_size), plotdir)
def plot_latency_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} desc['title'] = 'Latency: T=%s A=%s' % (topology, alpha) desc['xlabel'] = 'Cache to population ratio' desc['ylabel'] = 'Latency' desc['xscale'] = 'log' desc['xparam'] = ('cache_placement', 'network_cache') desc['xvals'] = cache_size_range desc['filter'] = { 'topology': { 'name': topology }, 'workload': { 'name': 'STATIONARY', 'alpha': alpha } } desc['ymetrics'] = [('LATENCY', 'MEAN')] * len(strategies) desc['ycondnames'] = [('strategy', 'name')] * len(strategies) desc['ycondvals'] = strategies desc['metric'] = ('LATENCY', 'MEAN') desc['errorbar'] = True desc['legend_loc'] = 'upper right' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'LATENCY_T=%s@A=%s.pdf' % (topology, alpha), plotdir)
def plot_link_load_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): desc = {} desc['title'] = 'Internal link load: T=%s C=%s' % (topology, cache_size) desc['xlabel'] = 'Alpha' desc['ylabel'] = 'Internal link load' desc['xparam'] = ('workload', 'alpha') desc['xvals'] = alpha_range desc['filter'] = { 'topology': { 'name': topology }, 'cache_placement': { 'network_cache': cache_size } } desc['ymetrics'] = [('LINK_LOAD', 'MEAN_INTERNAL')] * len(strategies) desc['ycondnames'] = [('strategy', 'name')] * len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper right' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'LINK_LOAD_INTERNAL_T=%s@C=%s.pdf' % (topology, cache_size), plotdir)
def plot_latency_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): desc = {} desc["title"] = "Latency: T=%s C=%s" % (topology, cache_size) desc["xlabel"] = r"Content distribution \alpha" desc["ylabel"] = "Latency (ms)" desc["xparam"] = ["alpha"] desc["xvals"] = alpha_range desc["filter"] = {"topology_name": topology, "network_cache": cache_size} desc["ymetrics"] = [("LATENCY", "MEAN")] * len(strategies) desc["ycondnames"] = [["strategy_name"]] * len(strategies) desc["ycondvals"] = strategies desc["errorbar"] = True desc["legend_loc"] = "upper right" desc["line_style"] = STRATEGY_STYLE desc["legend"] = STRATEGY_LEGEND desc["plotempty"] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, "LATENCY_T=%s@C=%s.pdf" % (topology, cache_size), plotdir)
def plot_link_load_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} desc["title"] = "Internal link load: T=%s A=%s" % (topology, alpha) desc["xlabel"] = "Cache to population ratio" desc["ylabel"] = "Internal link load" desc["xscale"] = "log" desc["xparam"] = ["network_cache"] desc["xvals"] = cache_size_range desc["filter"] = {"topology_name": topology, "alpha": alpha} desc["ymetrics"] = [("LINK_LOAD", "MEAN_INTERNAL")] * len(strategies) desc["ycondnames"] = [["strategy_name"]] * len(strategies) desc["ycondvals"] = strategies desc["errorbar"] = True desc["legend_loc"] = "upper right" desc["line_style"] = STRATEGY_STYLE desc["legend"] = STRATEGY_LEGEND desc["plotempty"] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, "LINK_LOAD_INTERNAL_T=%s@A=%s.pdf" % (topology, alpha), plotdir)
def plot_latency_vs_cache_size(resultset, topology, cache_size_range, rank_groups, plotdir): desc = {} desc['title'] = 'Latency vs cache Size: T=%s' % (topology) desc['xlabel'] = 'Cache size' desc['ylabel'] = 'Latency (ms)' desc['xparam'] = ('cache_placement','network_cache') desc['xvals'] = cache_size_range desc['filter'] = {'topology': {'name': topology}} desc['ymetrics'] = [('LATENCY', 'MEAN')]*len(rank_groups) desc['ycondnames'] = [('rankgroup', 'name')]*len(rank_groups) desc['ycondvals'] = rank_groups desc['errorbar'] = True desc['legend_loc'] = 'upper left' desc['line_style'] = RANKGROUP_STYLE desc['legend'] = RANKGROUP_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'LATENCY_VS_CACHE_SIZET=%s.pdf' % topology, plotdir)
def plot_latency_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): desc = {} desc['title'] = 'Latency: T=%s C=%s' % (topology, cache_size) desc['xlabel'] = 'Alpha' desc['ylabel'] = 'Latency (ms)' desc['xparam'] = ('workload', 'alpha') desc['xvals'] = alpha_range desc['filter'] = {'topology': {'name': topology}, 'cache_placement': {'network_cache': cache_size}} desc['ymetrics'] = [('LATENCY', 'MEAN')]*len(strategies) desc['ycondnames'] = [('strategy', 'name')]*len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper right' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'LATENCY_T=%s@C=%s.pdf' % (topology, cache_size), plotdir)
def plot_link_load_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): desc = {} desc['title'] = 'Internal link load: T=%s C=%s' % (topology, cache_size) desc['xlabel'] = u'Content distribution \u03b1' desc['ylabel'] = 'Internal link load' desc['xparam'] = ('workload', 'alpha') desc['xvals'] = alpha_range desc['filter'] = {'topology': {'name': topology}, 'cache_placement': {'network_cache': cache_size}} desc['ymetrics'] = [('LINK_LOAD', 'MEAN_INTERNAL')]*len(strategies) desc['ycondnames'] = [('strategy', 'name')]*len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper right' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'LINK_LOAD_INTERNAL_T=%s@C=%s.pdf' % (topology, cache_size), plotdir)
def plot_cache_hits_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): if "NO_CACHE" in strategies: strategies.remove("NO_CACHE") desc = {} desc["title"] = "Cache hit ratio: T=%s C=%s" % (topology, cache_size) desc["ylabel"] = "Cache hit ratio" desc["xlabel"] = r"Content distribution \alpha" desc["xparam"] = ["alpha"] desc["xvals"] = alpha_range desc["filter"] = {"topology_name": topology, "network_cache": cache_size} desc["ymetrics"] = [("CACHE_HIT_RATIO", "MEAN")] * len(strategies) desc["ycondnames"] = [["strategy_name"]] * len(strategies) desc["ycondvals"] = strategies desc["errorbar"] = True desc["legend_loc"] = "upper left" desc["line_style"] = STRATEGY_STYLE desc["legend"] = STRATEGY_LEGEND desc["plotempty"] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, "CACHE_HIT_RATIO_T=%s@C=%s.pdf" % (topology, cache_size), plotdir)
def plot_link_load_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} desc['title'] = 'Internal link load: T=%s A=%s' % (topology, alpha) desc['xlabel'] = 'Cache to population ratio' desc['ylabel'] = 'Internal link load' desc['xscale'] = 'log' desc['xparam'] = ('cache_placement','network_cache') desc['xvals'] = cache_size_range desc['filter'] = {'topology': {'name': topology}, 'workload': {'name': 'STATIONARY', 'alpha': alpha}} desc['ymetrics'] = [('LINK_LOAD', 'MEAN_INTERNAL')]*len(strategies) desc['ycondnames'] = [('strategy', 'name')]*len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = False desc['legend_loc'] = 'upper right' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'LINK_LOAD_INTERNAL_T=%s@A=%s.pdf' % (topology, alpha), plotdir)
def plot_link_load_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} desc['title'] = 'Internal link load: T=%s A=%s' % (topology, alpha) desc['xlabel'] = 'Cache to population ratio' desc['ylabel'] = 'Internal link load' desc['xscale'] = 'log' desc['xparam'] = ['network_cache'] desc['xvals'] = cache_size_range desc['filter'] = {'topology_name': topology, 'alpha': alpha} desc['ymetrics'] = [('LINK_LOAD', 'MEAN_INTERNAL')] * len(strategies) desc['ycondnames'] = [['strategy_name']] * len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper right' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'LINK_LOAD_INTERNAL_T=%s@A=%s.pdf' % (topology, alpha), plotdir)
def plot_cache_hits_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} if "NO_CACHE" in strategies: strategies.remove("NO_CACHE") desc["title"] = "Cache hit ratio: T=%s A=%s" % (topology, alpha) desc["xlabel"] = u"Cache to population ratio" desc["ylabel"] = "Cache hit ratio" desc["xscale"] = "log" desc["xparam"] = ["network_cache"] desc["xvals"] = cache_size_range desc["filter"] = {"topology_name": topology, "alpha": alpha} desc["ymetrics"] = [("CACHE_HIT_RATIO", "MEAN")] * len(strategies) desc["ycondnames"] = [["strategy_name"]] * len(strategies) desc["ycondvals"] = strategies desc["errorbar"] = True desc["legend_loc"] = "upper left" desc["line_style"] = STRATEGY_STYLE desc["legend"] = STRATEGY_LEGEND desc["plotempty"] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, "CACHE_HIT_RATIO_T=%s@A=%s.pdf" % (topology, alpha), plotdir)
def plot_latency_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} desc['title'] = 'Latency: T=%s A=%s' % (topology, alpha) desc['xlabel'] = 'Cache to population ratio' desc['ylabel'] = 'Latency' desc['xscale'] = 'log' desc['xparam'] = ['network_cache'] desc['xvals'] = cache_size_range desc['filter'] = {'topology_name': topology, 'alpha': alpha} desc['ymetrics'] = [('LATENCY', 'MEAN')]*len(strategies) desc['ycondnames'] = [['strategy_name']]*len(strategies) desc['ycondvals'] = strategies desc['metric'] = ('LATENCY', 'MEAN') desc['errorbar'] = True desc['legend_loc'] = 'upper right' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'LATENCY_T=%s@A=%s.pdf' % (topology, alpha), plotdir)
def plot_cache_hits_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir): if 'NO_CACHE' in strategies: strategies.remove('NO_CACHE') desc = {} desc['title'] = 'Cache hit ratio: T=%s C=%s' % (topology, cache_size) desc['ylabel'] = 'Cache hit ratio' desc['xlabel'] = 'Alpha' desc['xparam'] = ('workload', 'alpha') desc['xvals'] = alpha_range desc['filter'] = {'topology': {'name': topology}, 'cache_placement': {'network_cache': cache_size}} desc['ymetrics'] = [('CACHE_HIT_RATIO', 'MEAN')]*len(strategies) desc['ycondnames'] = [('strategy', 'name')]*len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper left' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc, 'CACHE_HIT_RATIO_T=%s@C=%s.pdf' % (topology, cache_size), plotdir)
def plot_cache_hits_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} if 'NO_CACHE' in strategies: strategies.remove('NO_CACHE') desc['title'] = 'Cache hit ratio: T=%s A=%s' % (topology, alpha) desc['xlabel'] = u'Cache to population ratio' desc['ylabel'] = 'Cache hit ratio' desc['xscale'] = 'log' desc['xparam'] = ['network_cache'] desc['xvals'] = cache_size_range desc['filter'] = {'topology_name': topology, 'alpha': alpha} desc['ymetrics'] = [('CACHE_HIT_RATIO', 'MEAN')]*len(strategies) desc['ycondnames'] = [['strategy_name']]*len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper left' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc,'CACHE_HIT_RATIO_T=%s@A=%s.pdf' % (topology, alpha), plotdir)
def plot_path_strech_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir): desc = {} if 'NO_CACHE' in strategies: strategies.remove('NO_CACHE') desc['title'] = 'Path Strech: T=%s A=%s' % (topology, alpha) desc['xlabel'] = 'Cache to population ratio' desc['ylabel'] = 'Cache hit ratio' desc['xscale'] = 'log' desc['xparam'] = ('cache_placement','network_cache') desc['xvals'] = cache_size_range desc['filter'] = {'topology': {'name': topology}, 'workload': {'name': 'STATIONARY', 'alpha': alpha}} desc['ymetrics'] = [('PATH_STRETCH', 'MEAN_CONTENT')]*len(strategies) desc['ycondnames'] = [('strategy', 'name')]*len(strategies) desc['ycondvals'] = strategies desc['errorbar'] = True desc['legend_loc'] = 'upper left' desc['line_style'] = STRATEGY_STYLE desc['legend'] = STRATEGY_LEGEND desc['plotempty'] = PLOT_EMPTY_GRAPHS plot_lines(resultset, desc,'PATH_STRETCH_T=%s@A=%s.pdf' % (topology, alpha), plotdir)