|
1 | | -% clc |
2 | | -% clear |
3 | | -load GsightLatencyData; |
| 1 | +clc |
| 2 | +clear |
| 3 | +load GsightLatencyDataNew; |
4 | 4 | figure1 = figure('PaperSize',[20.98404194812 29.67743169791]); |
5 | 5 |
|
6 | 6 | axes1 = axes('Parent',figure1,'YGrid','on'); |
7 | 7 | box(axes1,'on'); |
8 | 8 | hold(axes1,'all'); |
9 | | -GsightLatencyData=GsightLatencyData; |
10 | | -GsightLatencyData(:,[5 3 2])=GsightLatencyData(:,[5 3 2])*0.8; |
11 | | -a1 = GsightLatencyData(:,5);%EFRA390 252 |
12 | | -b1 = GsightLatencyData(:,1);%ElaX469 343 |
13 | | -c1 = GsightLatencyData(:,2);%EFRA390 425 |
14 | | -d1 = GsightLatencyData(:,4)-200;%peak401 550 |
15 | | -e1 = GsightLatencyData(:,6)-200;%PRESS681 642 |
16 | | - |
17 | | -hold on |
18 | | -lw = 3 |
19 | | -xi = linspace(min(a1),max(a1),100); |
20 | | -F = ksdensity(a1,xi,'function','cdf'); |
21 | | -plot(xi,F,'--', 'LineWidth',lw ,'color',[35 31 32]/255); %红色 |
22 | | - |
23 | | -xi = linspace(min(b1),max(b1),100); |
24 | | -F = ksdensity(b1,xi,'function','cdf'); |
25 | | -plot(xi,F,':', 'LineWidth',lw ,'color',[35 31 32]/255); %紫色 |
| 9 | +lw=3; |
| 10 | +plot(GsightLatencyDataNew(:,2),GsightLatencyDataNew(:,1),'--', 'LineWidth',lw ,'color',[35 31 32]/255); %红色 |
| 11 | +plot(GsightLatencyDataNew(:,4),GsightLatencyDataNew(:,3),':', 'LineWidth',lw ,'color',[35 31 32]/255); %紫色 |
| 12 | +plot(GsightLatencyDataNew(:,6),GsightLatencyDataNew(:,5),'-', 'LineWidth',lw ,'color', [238 41 47]/255); %绿色 |
| 13 | +plot(GsightLatencyDataNew(:,8),GsightLatencyDataNew(:,7),'-', 'LineWidth',lw ,'color', [35 31 32]/255) %黄色 |
| 14 | +plot(GsightLatencyDataNew(:,10),GsightLatencyDataNew(:,9),'-.', 'LineWidth',lw ,'color', [35 31 32]/255) %黄色 |
26 | 15 |
|
27 | | -xi = linspace(min(c1),max(c1),100); |
28 | | -F = ksdensity(c1,xi,'function','cdf'); |
29 | | -plot(xi,F,'-', 'LineWidth',lw ,'color', [238 41 47]/255); %绿色 |
30 | | - |
31 | | -xi = linspace(min(d1),max(d1),100); |
32 | | -F = ksdensity(d1,xi,'function','cdf'); |
33 | | -plot(xi,F,'-', 'LineWidth',lw ,'color', [35 31 32]/255) %黄色 |
34 | | - |
35 | | -xi = linspace(min(e1),max(e1),100); |
36 | | -F = ksdensity(e1,xi,'function','cdf'); |
37 | | -plot(xi,F,'-.', 'LineWidth',lw ,'color', [35 31 32]/255) %黄色 |
38 | | -% aa1 = plot(a1,x,'-', 'LineWidth',lw ,'color',[255 215 0]/255); %红色 |
39 | | -% bb1 = plot(b1,x,'-', 'LineWidth',lw ,'color', [153 102 153]/255); %紫色 |
40 | | -% cc1 = plot(c1,x,'-', 'LineWidth',lw ,'color', [51 153 51]/255); %绿色 |
41 | | -% dd1 = plot(e1,x,'-.', 'LineWidth',1.5,'color', [149 14 8]/255) %黄色 |
42 | | -% ee1 = plot([0 1400],[0.99 0.99],'-.', 'LineWidth',1.5,'color', [0 0 255]/255) % |
43 | | -% hold on; |
44 | | -% plot(967,0.9,'or', 'MarkerSize',12,'LineWidth',2.5) %黄色 |
45 | | -% hold on; |
46 | | -% plot(542,0.9,'or', 'MarkerSize',12,'LineWidth',2.5) %黄色 |
47 | 16 | set(gca,'YLim',[0 1]);%X轴的数据显示范围 |
48 | | -set(gca,'YTick',[0 : .2: 1]);%设置要显示坐标刻度 |
49 | | -% %set(gca,'yticklabels',{'0' ,'24' ,'48', '72', '96', '120'}); |
| 17 | +set(gca,'YTick',[0 : .2: 1]);%设置要显示坐标刻度 |
50 | 18 | set(gca,'XLim',[100 1300]);%X轴的数据显示范围 |
51 | 19 | set(gca,'XTick',[100 : 300: 1300]);%设置要显示坐标刻度 |
52 | 20 | set(gca,'xticklabels',[50 : 150: 1300]);%设置要显示坐标刻度 |
53 | | -set(gca, 'Fontsize' ,18) |
54 | | - %set(gca,'XTicklabel',{0:2:10});%设置要显示坐标刻度 |
55 | | - |
56 | | -% title('EMU of redis with BE Tasks', 'FontSize' , 13) |
| 21 | +set(gca, 'Fontsize' ,18) |
| 22 | + |
57 | 23 | xlabel('Latency (ms)', 'Fontsize' ,18) |
58 | 24 | ylabel('CDF', 'Fontsize' ,18) |
59 | 25 | set(gca, 'GridLineStyle', ':','ticklength',[0.002 0]) |
60 | 26 | set(gca,'xcolor',[0 0 0]); |
61 | | - set(gca,'ycolor',[0 0 0]); |
62 | | -%set the position of figure and axis |
63 | | - set(gcf,'position',[100 100 300 240]) |
64 | | -% set(gca,'units','normalized','position',[0.2 0.3 0.6 0.5],'box','off') |
65 | | - set(gca,'units','normalized','position',[0.24 0.3 0.7 0.65],'box','off') |
66 | | - %legend content |
67 | | -legend({'KNN','LR','RFR','SVR','MLP','90th'},'FontSize',12) |
| 27 | +set(gca,'ycolor',[0 0 0]); |
| 28 | +set(gcf,'position',[100 100 300 240]) |
| 29 | +set(gca,'units','normalized','position',[0.24 0.3 0.7 0.65],'box','off') |
| 30 | +legend('KNN','LR','RFR','SVR','MLP','90th') |
68 | 31 | box on |
69 | 32 | grid on |
70 | 33 |
|
0 commit comments