Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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,
    )
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
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)
Exemplo n.º 6
0
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)
Exemplo n.º 7
0
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)
Exemplo n.º 8
0
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)
Exemplo n.º 9
0
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)
Exemplo n.º 10
0
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)
Exemplo n.º 11
0
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)
Exemplo n.º 12
0
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)
Exemplo n.º 13
0
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)
Exemplo n.º 14
0
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)
Exemplo n.º 15
0
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)
Exemplo n.º 16
0
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)
Exemplo n.º 17
0
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)
Exemplo n.º 18
0
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)
Exemplo n.º 19
0
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)
Exemplo n.º 20
0
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)
Exemplo n.º 21
0
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)
Exemplo n.º 22
0
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)