Ejemplo n.º 1
0
        from_csv = False
        try:
            pickle_file = open(pickle_file_path, 'rb')
        except FileNotFoundError:
            from_csv = True
        else:
            print(" from pickle.")
            data_set.append(pickle.load(pickle_file))
            pickle_file.close()

        if from_csv:
            print(" from csv")
            vpp_data = analyze_vpp.read_vpp_file(base_dir + '/' + data_dir +
                                                 '/' + data_file)
            #analyze_vpp.hack_moving_min_into_vpp_data(vpp_data, 'all_ts')
            x, y = analyze_vpp.make_ecdf_data(vpp_data, 'all_ts', 'vec', True,
                                              True)
            #x_smooth, y_smooth = analyze_vpp.make_ecdf_data(vpp_data, 'all_ts_smooth', 'vec', True, True)

            data_entry = (data_dir, data_file, vpp_data, x, y)
            data_set.append(data_entry)
            pickle_file = open(pickle_file_path, 'wb')
            pickle.dump(data_entry, pickle_file)
            pickle_file.close()

print("I have {} data_entires.".format(len(data_set)))
print("moving on to plotting")

do_values_vec = list()
wired_values_vec = list()
wifi_values_vec = list()
Ejemplo n.º 2
0
runs_to_plot = (
				(r_cc_delay_5, "Dynamic window (CC)"),
				(r_w50_delay_5, "50 packet window"),
				(r_1r5_delay_0, "1.5 MBps pacer"),
			    )

f, ax = plt.subplots(1)
#ax.axhline(0.5, **GRIDLINEPROPS)
ax.axvline(0, **GRIDLINEPROPS)
#ax.axvline(1, **GRIDLINEPROPS)


for i in range(len(runs_to_plot)):
	run, label = runs_to_plot[i]
	x_values, y_values = analyze_vpp.make_ecdf_data(run, 'basic', ps_plot_interval)
	ax.plot(x_values, y_values,
			label=label,
			color = COLORS[i],
			marker = MARKERS[i][0],
			markersize = MARKERS[i][1],
			markeredgecolor = COLORS[i],
			markerfacecolor = (0,0,0,0),
			markevery = (0.1*i, 0.2))

ax.legend(title="Packet scheduler")
ax.set_xlim((-15, 15))
ax.set_xlabel("Error [ms]")
ax.set_ylabel("Cumulative fraction of data")
ax.set_yticks((0, 0.25, 0.5, 0.75, 1))
#ax.grid(True)
Ejemplo n.º 3
0
r_cc = analyze_vpp.analyze_run(
    "/home/piet/eth/msc/vpp-data/std_congestion_controller_10ms_80s/1520177626-mQzsO_delay-10ms"
)
#r_delay_1ms = analyze_vpp.analyze_run("/home/piet/eth/msc/vpp-data/one_direction_10ms_80s/1520172327-7y4Rk_delay-1ms")

## ECDF

# Just plot the result of the basic analyzer ECDF

f, ax = plt.subplots(1)
set_fig_size(f, 10, 7.5)
#f.set_size_inches(10, 7)
x_limits = (-20, 20)

x, y = analyze_vpp.make_ecdf_data(r_cc, 'basic')

ax.plot(x, y)
ax.set_xlim(x_limits)
#ax.set_xlabel("Spin bit RTT - client reported RTT")
#ax.set_ylabel("Relative cumulative frequency")

save_figure(f, "basic_ecdf")

## TIME SERIE
f, ax = plt.subplots(1)
set_fig_size(f, 20, 6)
ax.plot(r_cc['server_times'], r_cc['server_rtts'], label="Server", color=RED)
ax.plot(r_cc['client_times'],
        r_cc['client_rtts'],
        label="Client",
Ejemplo n.º 4
0
    (r_w60_reorder_30, 30),
    (r_w60_reorder_40, 40),
)

##
## ECDF for a single loss reordering rate
##

run_for_ecdf = r_w60_reorder_10

f, ax = plt.subplots(1)
#ax.axhline(0.5, **GRIDLINEPROPS)
ax.axvline(0, **GRIDLINEPROPS)

for analyzer, label, i in analyzers_to_plot:
    x_values, y_values = analyze_vpp.make_ecdf_data(run_for_ecdf, analyzer,
                                                    INTERVAL_OF_INTEREST)
    ax.plot(
        x_values,
        y_values,
        label=label,
        #linestyle = LINESTYLES[i],
        color=COLORS[i],
        marker=MARKERS[i][0],
        markersize=MARKERS[i][1],
        markeredgecolor=COLORS[i],
        markerfacecolor=(0, 0, 0, 0),
        markevery=(0.0 * i, 0.2))

ax.legend()
ax.set_xlim((-55, 15))
ax.set_xlabel("Observer estimate – client estimate [ms]")