Пример #1
0
        if component not in values:
            print component + " not present for benchmark " + benchmark, set_name
            quit()
        elif field not in values[component]:
            print field, "not present in component", component, benchmark, set_name
            quit()
        data[set_name][benchmark] = values[component][field]
        if per_n_insts is not None:
            data[set_name][benchmark] = float(data[set_name][benchmark]) * \
                per_n_insts / values["sim"]["insts"][0]

# ------------------------------------------------------------------------------
# Use kv data to polish the data
# ------------------------------------------------------------------------------

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

copy_wo = workload_order[:]
avail_keys = kv.keys()
workload_order = []
for key in copy_wo:
    if key in avail_keys:
        workload_order.append(key)

if args.normalize is not None:
    kv.normalize(args.normalize)

# ------------------------------------------------------------------------------
Пример #2
0
for mech in mechanisms:
    data[mech] = {}

workload_order = []

fin = open(sys.argv[1])
for line in fin:
    fields = line.split()
    key = fields[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)
Пример #3
0
for mech in mechanisms:
    data[mech] = {}

workload_order = []

fin = open(sys.argv[1])
for line in fin:
    fields = line.split()
    key = fields[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)
Пример #4
0
            print component + " not present for benchmark " + benchmark, set_name
            quit()
        elif field not in values[component]:
            print field, "not present in component", component, benchmark, set_name
            quit()
        data[set_name][benchmark] = values[component][field]
        if per_n_insts is not None:
            data[set_name][benchmark] = float(data[set_name][benchmark]) * \
                per_n_insts / values["sim"]["insts"][0]
        

# ------------------------------------------------------------------------------
# Use kv data to polish the data
# ------------------------------------------------------------------------------

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

copy_wo = workload_order[:]
avail_keys = kv.keys()
workload_order = []
for key in copy_wo:
    if key in avail_keys:
        workload_order.append(key)

if args.normalize is not None:
    kv.normalize(args.normalize)