update plotting script label
This commit is contained in:
parent
cbf82ca5c4
commit
691041b6c8
|
@ -19,8 +19,7 @@ plots_dir="./plot_burst/"
|
|||
os.makedirs(plots_dir,exist_ok=True)
|
||||
|
||||
# plots_dir="/home/vamsi/Powertcp-NSDI/"
|
||||
plt.rcParams.update({'font.size': 18})
|
||||
|
||||
plt.rcParams.update({'font.size': 18,'font.family':'PingFang SC'})
|
||||
|
||||
|
||||
algs=list(["dcqcn", "powerInt", "hpcc", "powerDelay", "timely", "dctcp","patchedTimely","swift","rttqcn"])
|
||||
|
@ -39,7 +38,7 @@ lenged_elements=list()
|
|||
|
||||
# red green blue brownm grey
|
||||
colorsBurst=list(["#1979a9","red", "#478fb5","tab:brown","tab:gray"])
|
||||
labels=list(['Throughput','Qlen'])
|
||||
labels=list(['吞吐量','队列长度'])
|
||||
|
||||
for i in range(1,3):
|
||||
lenged_elements.append(Line2D([0],[0], color=colorsBurst[i-1],lw=6, label=labels[i-1]))
|
||||
|
@ -55,7 +54,7 @@ for alg in algs:
|
|||
ax1=ax.twinx()
|
||||
ax.set_yticks([10e9,25e9,40e9,80e9,100e9])
|
||||
ax.set_yticklabels(["10","25","40","80","100"])
|
||||
ax.set_ylabel("Throughput (Gbps)")
|
||||
ax.set_ylabel("吞吐量 (Gbps)")
|
||||
|
||||
start=0.15
|
||||
xtics=[i*0.001+start for i in range(0,6)]
|
||||
|
@ -63,12 +62,12 @@ for alg in algs:
|
|||
xticklabels=[str(i) for i in range(0,6)]
|
||||
ax.set_xticklabels(xticklabels)
|
||||
|
||||
ax.set_xlabel("Time (ms)")
|
||||
ax.set_xlabel("时间 (ms)")
|
||||
ax.set_xlim(0.1495,0.154)
|
||||
ax.plot(df["time"],df["th"],label="Throughput",c='#1979a9',lw=2)
|
||||
ax.plot(df["time"],df["th"],label="吞吐量",c='#1979a9',lw=2)
|
||||
ax1.set_ylim(0,600)
|
||||
ax1.set_ylabel("Queue length (KB)")
|
||||
ax1.plot(df["time"],df["qlen"]/(1000),c='r',label="Qlen",lw=2)
|
||||
ax1.set_ylabel("队列长度 (KB)")
|
||||
ax1.plot(df["time"],df["qlen"]/(1000),c='r',label="队列长度",lw=2)
|
||||
# ax.legend(loc=1)
|
||||
# ax1.legend(loc=3)
|
||||
# fig.legend(loc=2,ncol=2,framealpha=0,borderpad=-0.1)
|
||||
|
@ -83,19 +82,19 @@ for alg in algs:
|
|||
ax3=ax2.twinx()
|
||||
ax2.set_yticks([10e9,25e9,40e9,80e9,100e9])
|
||||
ax2.set_yticklabels(["10","25","40","80","100"])
|
||||
ax2.set_ylabel("Throughput (Gbps)")
|
||||
ax2.set_ylabel("吞吐量 (Gbps)")
|
||||
|
||||
start=0.15
|
||||
xtics=[i*0.001+start for i in range(0,6)]
|
||||
ax2.set_xticks(xtics)
|
||||
xticklabels=[str(i) for i in range(0,6)]
|
||||
ax2.set_xticklabels(xticklabels)
|
||||
ax2.set_xlabel("Time (ms)")
|
||||
ax2.set_xlabel("时间 (ms)")
|
||||
ax2.set_xlim(0.1495,0.154)
|
||||
ax2.plot(df["time"],df["th"],label="Throughput",c='#1979a9',lw=2)
|
||||
ax3.set_ylabel("Normalized Power")
|
||||
ax2.plot(df["time"],df["th"],label="吞吐量",c='#1979a9',lw=2)
|
||||
ax3.set_ylabel("归一化功率")
|
||||
ax3.set_ylim(0,2)
|
||||
ax3.plot(df["time"],df["power"],c='g',label="NormPower",lw=2)
|
||||
ax3.plot(df["time"],df["power"],c='g',label="归一化功率",lw=2)
|
||||
fig1.tight_layout()
|
||||
fig1.savefig(plots_dir+alg+'-power.pdf')
|
||||
fig1.savefig(plots_dir+alg+'-power.png')
|
||||
|
|
|
@ -19,11 +19,11 @@ plots_dir="./plot_fairness/"
|
|||
os.makedirs(plots_dir,exist_ok=True)
|
||||
|
||||
# plots_dir="/home/vamsi/Powertcp-NSDI/"
|
||||
plt.rcParams.update({'font.size': 18})
|
||||
plt.rcParams.update({'font.size': 18,'font.family':'PingFang SC'})
|
||||
|
||||
|
||||
|
||||
algs=list(["dcqcn", "powerInt", "hpcc", "powerDelay", "timely", "dctcp","patchedTimely","swift","rttqcn"])
|
||||
algs=list(["powerDelay", "timely","patchedTimely","swift","rttqcn"])
|
||||
algnames={"dcqcn":"DCQCN","powerInt":"PowerTCP","hpcc":"HPCC","powerDelay":r'$\theta-PowerTCP$',"timely":"TIMELY","DCTCP":"DCTCP","patchedTimely":"Patched TIMELY","swift":"Swift","rttqcn":"RTT-QCN"}
|
||||
|
||||
|
||||
|
@ -52,8 +52,8 @@ for alg in algs:
|
|||
ax.xaxis.grid(True,ls='--')
|
||||
ax.yaxis.grid(True,ls='--')
|
||||
|
||||
ax.set_ylabel("Throughput (Gbps)")
|
||||
ax.set_xlabel("Time (s)")
|
||||
ax.set_ylabel("吞吐量 (Gbps)")
|
||||
ax.set_xlabel("时间 (s)")
|
||||
# fig.suptitle(alg)
|
||||
|
||||
df1 = pd.read_csv(results+'result-'+alg+'.1',delimiter=' ',usecols=[5,7],names=["th","time"])
|
||||
|
|
|
@ -19,7 +19,7 @@ plots_dir="./plot_workload/"
|
|||
os.makedirs(plots_dir,exist_ok=True)
|
||||
|
||||
# plots_dir="/home/vamsi/Powertcp-NSDI/"
|
||||
plt.rcParams.update({'font.size': 18})
|
||||
plt.rcParams.update({'font.size': 18,'font.family':'PingFang SC'})
|
||||
|
||||
|
||||
|
||||
|
@ -106,8 +106,8 @@ for alg in algs:
|
|||
for load in ["0.2","0.6"]:
|
||||
fig,ax = plt.subplots(1,1)
|
||||
ax.set_label("Flow size")
|
||||
ax.set_ylabel("99.9-pct FCT slowdown")
|
||||
ax.set_xlabel("Flow size (bytes)")
|
||||
ax.set_ylabel("99.9 百分位流完成时间减缓倍数")
|
||||
ax.set_xlabel("流大小(以字节计)")
|
||||
ax.set_yscale('log')
|
||||
ax.set_ylim(1,20)
|
||||
ax.set_xticks(fS)
|
||||
|
@ -220,8 +220,8 @@ for alg in algs:
|
|||
ax.plot(loadInt,fcts99,label=algnames[alg],marker=markers[alg],lw=2,markersize=10,c=colors[alg])
|
||||
fctsall[alg]=fcts99
|
||||
|
||||
ax.set_xlabel('load (%)')
|
||||
ax.set_ylabel('99.9-pct FCT slowdown')
|
||||
ax.set_xlabel('负载 (%)')
|
||||
ax.set_ylabel('99.9 百分位流完成时间减缓倍数')
|
||||
# fig.savefig(plots_dir+'fct'+'.pdf')
|
||||
# ax.legend(framealpha=0)
|
||||
fig.tight_layout()
|
||||
|
@ -276,8 +276,8 @@ for alg in algs:
|
|||
ax.plot(loadInt,fcts99,label=algnames[alg],marker=markers[alg],lw=2,markersize=10,c=colors[alg])
|
||||
fctsall[alg]=fcts99
|
||||
|
||||
ax.set_xlabel('load (%)')
|
||||
ax.set_ylabel('99.9-pct FCT slowdown')
|
||||
ax.set_xlabel('负载 (%)')
|
||||
ax.set_ylabel('99.9 百分位流完成时间减缓倍数')
|
||||
# fig.savefig(plots_dir+'fct'+'.pdf')
|
||||
# ax.legend(framealpha=0)
|
||||
fig.tight_layout()
|
||||
|
@ -335,8 +335,8 @@ for alg in algs:
|
|||
ax.plot(REQ_RATE,fcts99,label=algnames[alg],marker=markers[alg],lw=2,markersize=10,c=colors[alg])
|
||||
fctsall[alg]=fcts99
|
||||
|
||||
ax.set_xlabel('Request rate')
|
||||
ax.set_ylabel('99.9-pct FCT slowdown')
|
||||
ax.set_xlabel('请求速率')
|
||||
ax.set_ylabel('99.9 百分位流完成时间减缓倍数')
|
||||
fig.tight_layout()
|
||||
fig.savefig(plots_dir+'fct-shortRate'+'.pdf')
|
||||
fig.savefig(plots_dir+'fct-shortRate'+'.png')
|
||||
|
@ -388,8 +388,8 @@ for alg in algs:
|
|||
ax.plot(REQ_RATE,fcts99,label=algnames[alg],marker=markers[alg],lw=2,markersize=10,c=colors[alg])
|
||||
fctsall[alg]=fcts99
|
||||
|
||||
ax.set_xlabel('Request rate')
|
||||
ax.set_ylabel('99.9-pct FCT slowdown')
|
||||
ax.set_xlabel('请求速率')
|
||||
ax.set_ylabel('99.9 百分位流完成时间减缓倍数')
|
||||
fig.tight_layout()
|
||||
fig.savefig(plots_dir+'fct-longRate'+'.pdf')
|
||||
fig.savefig(plots_dir+'fct-longRate'+'.png')
|
||||
|
@ -444,8 +444,8 @@ for alg in algs:
|
|||
ax.plot(np.arange(len(REQ_SIZE)),fcts99,label=algnames[alg],marker=markers[alg],lw=2,markersize=10,c=colors[alg])
|
||||
fctsall[alg]=fcts99
|
||||
|
||||
ax.set_xlabel('Request size (MB)')
|
||||
ax.set_ylabel('99.9-pct FCT slowdown')
|
||||
ax.set_xlabel('请求大小 (MB)')
|
||||
ax.set_ylabel('99.9 百分位流完成时间减缓倍数')
|
||||
fig.tight_layout()
|
||||
fig.savefig(plots_dir+'fct-shortBurst4'+'.pdf')
|
||||
fig.savefig(plots_dir+'fct-shortBurst4'+'.png')
|
||||
|
@ -499,8 +499,8 @@ for alg in algs:
|
|||
ax.plot(np.arange(len(REQ_SIZE)),fcts99,label=algnames[alg],marker=markers[alg],lw=2,markersize=10,c=colors[alg])
|
||||
fctsall[alg]=fcts99
|
||||
|
||||
ax.set_xlabel('Request size (MB)')
|
||||
ax.set_ylabel('99.9-pct FCT slowdown')
|
||||
ax.set_xlabel('请求大小 (MB)')
|
||||
ax.set_ylabel('99.9 百分位流完成时间减缓倍数')
|
||||
fig.tight_layout()
|
||||
fig.savefig(plots_dir+'fct-longBurst4'+'.pdf')
|
||||
fig.savefig(plots_dir+'fct-longBurst4'+'.png')
|
||||
|
@ -534,7 +534,7 @@ fig,ax=plt.subplots(1,1)
|
|||
ax.set_xticks([0,50*K,100*K,150*K,200*K])
|
||||
ax.set_xticklabels(["0","50","100","150","200"])
|
||||
ax.set_ylabel("CDF")
|
||||
ax.set_xlabel("Buffer occupancy (KB)")
|
||||
ax.set_xlabel("缓冲区占用 (KB)")
|
||||
|
||||
for alg in algs:
|
||||
df = pd.read_csv(results+'result-'+alg+'-'+load+'-'+req+'-'+query+'.buf',delimiter=' ',usecols=[3],names=["qlen"])
|
||||
|
@ -572,7 +572,7 @@ ax.set_xticks([0,0.5*M,1*M,1.5*M,2*M,2.5*M])
|
|||
ax.set_xticklabels(["0","0.5","1","1.5","2","2.5"])
|
||||
ax.set_ylabel("CDF")
|
||||
ax.set_xlim(-50*K,1.5*M)
|
||||
ax.set_xlabel("Buffer occupancy (MB)")
|
||||
ax.set_xlabel("缓冲区占用 (MB)")
|
||||
|
||||
cdfs=pd.DataFrame()
|
||||
|
||||
|
|
Loading…
Reference in New Issue