コード例 #1
0
            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)

    if args.plot_line:
        xtics = range(0, (len(workload_order)/args.x_tics_step)*args.x_tics_step + args.x_tics_step - 1,\
コード例 #2
0
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]")

plot.continuous_lines(efdata,
                      legend=legend,
                      xtics=eaffrac,
                      use_markers=2,
                      x_padding=5)
コード例 #3
0
ファイル: scratch.py プロジェクト: abhowmick22/Simulator
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]")

plot.continuous_lines(efdata, legend = legend, xtics = eaffrac, use_markers = 2, x_padding = 5)
                      
#plot.column_stacked_bars(workload_order, [kv.values(name, key_order = workload_order) for name in mechanisms], legend)
plot.save_pdf(efplotname)
コード例 #4
0
ファイル: trend_plot.py プロジェクト: ChunHungLiu/Simulator
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)
plot.save_pdf(os.path.basename(sys.argv[1]))
コード例 #5
0
ファイル: trend_plot.py プロジェクト: abhowmick22/Simulator
    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)
plot.save_pdf(os.path.basename(sys.argv[1]))
plot.save_tikz(os.path.basename(sys.argv[1]) + ".tex")
コード例 #6
0
ファイル: parse_results.py プロジェクト: ghmegan/memsim
            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)

    if args.plot_line:
        xtics = range(0, (len(workload_order)/args.x_tics_step)*args.x_tics_step + args.x_tics_step - 1,\