Exemplo n.º 1
0
bfcore1 = [3, 3, 4, 5, 5, 5]
bfcore2 = [7, 9, 10, 14, 15, 15]
bfcore4 = [13, 17, 20, 21, 21, 21]

bfdata = [zip(bffrac, bfcore1), zip(bffrac, bfcore2), zip(bffrac, bfcore4)]
bfxtics = [0.18, 0.36, 0.73, 1.47, 2.94, 5.88]
bfxlabel = 'Percentage Overhead of Bloom Filter vs Cache Size'
bfylabel = '\% Weighted Speedup Improvement over LRU'
bflegend = ['1-Core', '2-Core', '4-Core']
bfystep = 3

bfplotname = 'bf-size'

#################################

plot = PlotLib()

legend = eflegend
plot.set_y_tics_step(efystep)
plot.set_y_tics_shift(0)
plot.set_legend_shift(-50, -10)
plot.set_plot_dimensions(150, 80)
plot.set_scale(0.5)
plot.set_y_tics_font_size("scriptsize")
plot.set_x_tics_font_size("scriptsize")
plot.set_y_label_font_size("small")
plot.set_x_label_font_size("small")
plot.set_ceiling(0.8)

plot.xlabel(efxlabel, yshift=-10, fontsize="small", options="[scale=0.8]")
plot.ylabel(efylabel, xshift=-2, fontsize="small", options="[scale=0.8]")
Exemplo n.º 2
0
    if name not in args.ignore:
        output = [cur + "," + str(round(val,args.round)).ljust(args.round+2,'0') for cur, val in \
            zip(output, kv.values(name, key_order = print_order))]

if args.print_table:
    if not args.no_header:
        print ','.join(['%s' % (set_name) for set_name in set_order])
    for line in output:
        print line

# ------------------------------------------------------------------------------
# Plot data if requested
# ------------------------------------------------------------------------------

if args.plot:
    plot = PlotLib()

    plot.set_plot_dimensions(args.plot_width, args.plot_height)

    if args.y_tics_step is not None:
        plot.set_y_tics_step(args.y_tics_step)
    elif args.normalize is not None:
        plot.set_y_tics_step(0.1)

    plot.set_ceiling(args.ceiling)

    legend = [name for name in set_order if name not in args.ignore]
    if args.no_legend:
        legend = []
    plot.set_legend_shift(args.legend_x_shift, args.legend_y_shift)
Exemplo n.º 3
0
bfcore1 = [  3,    3,    4,    5,    5,    5]
bfcore2 = [  7,    9,   10,   14,   15,   15]
bfcore4 = [ 13,   17,   20,   21,   21,   21]

bfdata = [zip(bffrac, bfcore1), zip(bffrac, bfcore2), zip(bffrac, bfcore4)]
bfxtics = [0.18, 0.36, 0.73, 1.47, 2.94, 5.88]
bfxlabel = 'Percentage Overhead of Bloom Filter vs Cache Size'
bfylabel = '\% Weighted Speedup Improvement over LRU'
bflegend = ['1-Core', '2-Core', '4-Core']
bfystep = 3

bfplotname = 'bf-size'

#################################

plot = PlotLib()

legend = eflegend
plot.set_y_tics_step(efystep)
plot.set_y_tics_shift(0)
plot.set_legend_shift(-50,-10)
plot.set_plot_dimensions(150,80)
plot.set_scale(0.5)
plot.set_y_tics_font_size("scriptsize")
plot.set_x_tics_font_size("scriptsize")
plot.set_y_label_font_size("small")
plot.set_x_label_font_size("small")
plot.set_ceiling(0.8)

plot.xlabel(efxlabel, yshift = -10, fontsize = "small", options =
"[scale=0.8]")
Exemplo n.º 4
0
    values = [float(val) for val in fields[1:]]
    workload_order.append(key)

    for i, mech in enumerate(mechanisms):
        data[mech][key] = values[i]

kv = KeyValueData()
for name, values in data.iteritems():
    kv.add_data(name, values)
kv.extract_keys()

print(kv.keys())

#mechanisms = mechanisms[1:]

plot = PlotLib()
legend = mechanisms[:]
plot.set_y_tics_step(0.1)
plot.set_y_tics_shift(0)
plot.set_legend_shift(-50, -10)
plot.set_plot_dimensions(220, 80)
plot.set_scale(0.5)
plot.set_y_tics_font_size("scriptsize")
plot.set_x_tics_font_size("scriptsize")
plot.set_y_label_font_size("small")
plot.set_x_label_font_size("small")
plot.set_ceiling(0.85)
plot.xlabel("Workloads", yshift=-10, fontsize="small", options="")
plot.ylabel(sys.argv[2], xshift=-2, fontsize="small", options="")
plot.column_stacked_bars(
    workload_order,
Exemplo n.º 5
0
from plotlib import PlotLib
import numpy as np
# create random data
x = np.arange(23)
y = np.random.randint(8, 20, 23)
y2 = np.random.randint(8, 20, 23)

# load a figure
fig = PlotLib()
print(fig.fig)
fig.plot_fill(x, y, legend='y')

fig2 = PlotLib()
# create two subplots
a = fig2.get_subplot(1, 2, 0, 1)
b = fig2.get_subplot(1, 2, 0, 0)

# plot data on subplots
a.plot_fill(x, y, legend='y')
b.plot_fill(x, y, legend='y')
a.plot_fill(x, y2, legend='y2')

print("finished main thread!")
input("press enter to continue")

a.plot_fill(x, y2 + y, legend='y2+y')
Exemplo n.º 6
0
    values = [float(val) for val in fields[1:]]
    workload_order.append(key)

    for i,mech in enumerate(mechanisms):
        data[mech][key] = values[i]

kv = KeyValueData()
for name, values in data.iteritems():
    kv.add_data(name, values)
kv.extract_keys()

print (kv.keys())

#mechanisms = mechanisms[1:]

plot = PlotLib()
legend = mechanisms[:]
plot.set_y_tics_step(0.1)
plot.set_y_tics_shift(0)
plot.set_legend_shift(-50,-10)
plot.set_plot_dimensions(220,80)
plot.set_scale(0.5)
plot.set_y_tics_font_size("scriptsize")
plot.set_x_tics_font_size("scriptsize")
plot.set_y_label_font_size("small")
plot.set_x_label_font_size("small")
plot.set_ceiling(0.85)
plot.xlabel("Workloads", yshift = -10, fontsize = "small", options =
"")
plot.ylabel(sys.argv[2], xshift = -2, fontsize = "small", options = "")
plot.column_stacked_bars(workload_order, [kv.values(name, key_order = workload_order) for name in mechanisms], legend, key_padding = 0.3, value_base = 0)
Exemplo n.º 7
0
    if name not in args.ignore:
        output = [cur + "," + str(round(val,args.round)).ljust(args.round+2,'0') for cur, val in \
            zip(output, kv.values(name, key_order = print_order))]

if args.print_table:
    if not args.no_header: print ','.join(['%s' % (set_name) for set_name in set_order])
    for line in output:
        print line


# ------------------------------------------------------------------------------
# Plot data if requested
# ------------------------------------------------------------------------------

if args.plot:
    plot = PlotLib()

    plot.set_plot_dimensions(args.plot_width, args.plot_height)

    if args.y_tics_step is not None:
        plot.set_y_tics_step(args.y_tics_step)
    elif args.normalize is not None:
        plot.set_y_tics_step(0.1)
    
    plot.set_ceiling(args.ceiling)

    legend = [name for name in set_order if name not in args.ignore]
    if args.no_legend:
        legend = []
    plot.set_legend_shift(args.legend_x_shift, args.legend_y_shift)