Exemplo n.º 1
0
def plotCPUComparisonDirs(dir2props_dict = {}):
    return plotClusterBarComparisonDirs(
            dir2props_dict,

            subplot_props = ['rate_mbps'],
            cluster_props = ['nclasses'],
            trial_props = ['run'],

            fn_sort_subplots = lambda subplots: sortRateValSets(subplots),
            fn_sort_clusters = lambda clusters: sortNClassesValSets(clusters),
            fn_sort_majorgroups = lambda majorgroups: majorgroups,

            fn_get_subplot_title = (lambda rate_val_set:
                'Rate: %s Gbps' %
                (getRateMbpsFromPropValSet(rate_val_set) / 1000)),

            fn_get_cluster_label = (lambda nclasses_val_set:
                str(getNClassesFromPropValSet(nclasses_val_set))),

            fn_get_majorgroup_label = (lambda sysconf, common_props:
                getSysConfLabel(sysconf, common_props)),

            fn_get_datapoint = lambda directory: getKernelCPUUtil(directory),

            xLabel = 'Number of classes',
            yLabel = 'Kernel CPU util. (%)')
Exemplo n.º 2
0
def plotBurstLenComparisonDirs(dir2props_dict, fn_get_datapoint,
                               yLabel, layout=None):
    return plotClusterBarComparisonDirs(
            dir2props_dict,

            subplot_props = ['rate_mbps'],
            cluster_props = ['nclasses'],
            trial_props = ['run'],

            fn_sort_subplots = sortRateValSets,
            fn_sort_clusters = sortNClassesValSets,
            fn_sort_majorgroups = lambda majorgroups: majorgroups,

            fn_get_subplot_title = (lambda rate_val_set:
                'Rate: %s Gbps' %
                (getRateMbpsFromPropValSet(rate_val_set) / 1000)),

            fn_get_cluster_label = (lambda nclasses_val_set:
                str(getNClassesFromPropValSet(nclasses_val_set))),

            fn_get_majorgroup_label = getSysConfLabel,

            fn_get_datapoint = fn_get_datapoint,

            xLabel = 'Number of classes',
            yLabel = yLabel,
            layout = layout)
Exemplo n.º 3
0
def plotCPUComparisonDirs(dir2props_dict={}):
    return plotClusterBarComparisonDirs(
        dir2props_dict,
        subplot_props=['rate_mbps'],
        cluster_props=['nclasses'],
        trial_props=['run'],
        fn_sort_subplots=lambda subplots: sortRateValSets(subplots),
        fn_sort_clusters=lambda clusters: sortNClassesValSets(clusters),
        fn_sort_majorgroups=lambda majorgroups: majorgroups,
        fn_get_subplot_title=(
            lambda rate_val_set: 'Rate: %s Gbps' %
            (getRateMbpsFromPropValSet(rate_val_set) / 1000)),
        fn_get_cluster_label=(lambda nclasses_val_set: str(
            getNClassesFromPropValSet(nclasses_val_set))),
        fn_get_majorgroup_label=(lambda sysconf, common_props: getSysConfLabel(
            sysconf, common_props)),
        fn_get_datapoint=lambda directory: getKernelCPUUtil(directory),
        xLabel='Number of classes',
        yLabel='Kernel CPU util. (%)')
Exemplo n.º 4
0
def plotBurstLenComparisonDirs(dir2props_dict,
                               fn_get_datapoint,
                               yLabel,
                               layout=None):
    return plotClusterBarComparisonDirs(
        dir2props_dict,
        subplot_props=['rate_mbps'],
        cluster_props=['nclasses'],
        trial_props=['run'],
        fn_sort_subplots=sortRateValSets,
        fn_sort_clusters=sortNClassesValSets,
        fn_sort_majorgroups=lambda majorgroups: majorgroups,
        fn_get_subplot_title=(
            lambda rate_val_set: 'Rate: %s Gbps' %
            (getRateMbpsFromPropValSet(rate_val_set) / 1000)),
        fn_get_cluster_label=(lambda nclasses_val_set: str(
            getNClassesFromPropValSet(nclasses_val_set))),
        fn_get_majorgroup_label=getSysConfLabel,
        fn_get_datapoint=fn_get_datapoint,
        xLabel='Number of classes',
        yLabel=yLabel,
        layout=layout)