Esempio n. 1
0
trans_m_k = [961, 971, 984, 988, 1008, 1030, 1172]
trans_err_k = [49, 80, 74, 113, 159, 248, 443]

trans_m_k_5 = [620, 630, 643, 656, 700, 724, 797]
trans_err_k_5 = [36, 38, 60, 108, 198, 196, 324]


fig = plt.figure(figsize=(4*1.5, 3*1.5))
ax = plt.gca()
plt.errorbar (nant_range, trans_m, yerr=trans_err, linewidth=4, color='blue', label='10MHz')
plt.errorbar (nant_range, trans_m_5, yerr=trans_err_5, linewidth=4, color='orange', label='5MHz')

plt.grid()
plt.xlabel('# Antennas')
plt.xlim([1,15])
plt.ylim([400, 1400])
plt.ylabel('RTT/2 (us)')
nospines(ax)

lg=ax.legend(loc='upper left',numpoints=1)
if lg is not None:
    lg.draw_frame(False)

plt.grid()
pp = PdfPages('../plot/rtt_ant_g.pdf')
pp.savefig(bbox_inches='tight',  dpi=300)
pp.close()
plt.close(fig)

fig = plt.figure(figsize=(4*1.5, 3*1.5))
ax = plt.gca()
Esempio n. 2
0
File: test.py Progetto: gkchai/garud
width = 0.15

ans = []
for i in range(3):
    ans.append(100*(1- ours[i]/ciq[i]) )

rectso = ax.bar(ind, ciq, width, color = 'white', alpha=1, capsize=8, linewidth= 1, label='CloudIQ')
rects1 = ax.bar(ind+0.15, ours, width, color = color2, alpha=1, capsize=8, linewidth= 1, label='RT-OPEX')

plt.ylabel('Deadline miss')
plt.xticks(ind+0.1)
ax.set_xticklabels( ('10dB', '15dB', '20dB', '25dB', '30dB') )
plt.xlabel('SNR')
ax.set_yscale('log')
# ax.set_yscale('log')
plt.ylim([0.0001, 1])
# plt.xlim([0, 1.6])

nospines(ax)
ax.yaxis.grid(True)

# lg=ax.legend(loc='upper left',numpoints=1)
# if lg is not None:
#     lg.draw_frame(False)


pp = PdfPages('../plot/ciq_comp.pdf')
pp.savefig( bbox_inches='tight', dpi=300)
pp.close()
plt.close(fig)
Esempio n. 3
0
    for sched in sched_range:
        obj = utils.read_pickle('../dump/gstat_exp%s_samp%d_prior%d_sched%s_nant%d_nproc%d'%(exp, samples, prior,sched,nants, nprocs))
        stats[sched] = astat(obj.proc['slack'])


    fig = plt.figure(figsize=(4*1.5, 3*1.5))
    ax = plt.gca()
    bins = np.linspace(-500, 2000, 1000)
    plt.plot(bins, stats['SCHED_FIFO'].get_cdf(bins), linewidth=4, label='FIFO')
    plt.plot(bins, stats['SCHED_RR'].get_cdf(bins), linewidth=4, label='RR', color='#999fff')
    plt.plot(bins, stats['SCHED_OTHER'].get_cdf(bins), linewidth=4, label='OTHER', color='black')

    # ax.set_yticks(np.arange(0,6,1))
    plt.xlabel('Slack (us)')
    plt.ylabel('CDF')
    plt.ylim(0,1)
    nospines(ax)
    plt.grid()
    pp = PdfPages('plot/cdf_slack_sched.pdf')
    pp.savefig( bbox_inches='tight', dpi=300)
    pp.close()
    plt.close(fig)


    ##############################
    # cdf duration of transport, processing, offload
    prior = 99
    sched = 'SCHED_FIFO'
    nants = 4

    stats = {}
Esempio n. 4
0
        fig = plt.figure(figsize=(8*1.7, 3*1.7))
        ax = plt.gca()

        # for ix, exp in enumerate(exp_range):
        for ix, exp in enumerate(exp_range_str):
            # plt.plot(rtt_range, y1[ix], ls[ix], color=colors_e[ix], mfc='none', label=exp_range_str[ix], ms=14, mec=colors_e[ix], linewidth=4, markeredgewidth=4)

            # if exp == 'static' or exp == 'static2':
            plt.plot(rtt_range, y1[ix], ls[ix], color=colors_e[ix], mfc='none', label=exp_range_str[ix], linewidth=4)

        # plt.grid()
        ax.set_yscale('log')
        plt.xlabel('RTT/2 (us)')
        # plt.xlabel('MCS')
        plt.ylabel('Deadline miss rate')
        plt.ylim(0.001,1.1)
        plt.xlim(350, 600)
        nospines(ax)

        # lg=ax.legend(loc='lower right',numpoints=1, fontsize=20)
        lg=ax.legend(loc='upper left',numpoints=1, fontsize=20)
        if lg is not None:
            lg.draw_frame(False)

        plt.grid()
        pp = PdfPages('../plot/miss_rtt_all_var_bs%d.pdf'%num_bss)
        pp.savefig(bbox_inches='tight',  dpi=300)
        pp.close()
        plt.close(fig)

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