-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathplot_4_stream.m
77 lines (68 loc) · 2.13 KB
/
plot_4_stream.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
function plot_4_stream(a,Tlim,maxR,maxD,maxRT, U)
% Plot stdout for 4-streaming
% script is adapted to 4 streams
% Tlim [min max] time e.g [0 1000]
% maxR max rate [Mbps]
% maxD max delay [s]
% example:
% >a = load('logfile.txt');
% >plot_vay_4(a,[0 1000],15,0.1);
T=a(:,1);T=T-T(1);
B = ones(1,U)/U;
K=7;L=1;
subplot(K,1,L);L=L+1;
plot(T,a(:,4)/1e3,T,a(:,5)/1e3,':',T,a(:,7)*max(a(:,4))/1e3*0.05,':k');
set(gca,'FontSize',12);grid on;
title('CWND and bytes in flight [kbyte]')
set(gca,'XTickLabel',[]);
xlim(Tlim);
subplot(K,1,L);L=L+1;
plot(T,a(:,2),T,a(:,3));
set(gca,'FontSize',12);grid on;
set(gca,'XTickLabel',[]);
title('Est. queue delay and RTT [s]')
ylim([0 maxD]);
xlim(Tlim);
subplot(K,1,L);L=L+1;
plot(T,a(:,8),T,a(:,8+6),T,a(:,8+12),T,a(:,8+18));
set(gca,'FontSize',12);grid on;
set(gca,'XTickLabel',[]);
legend('0','1','2','3')
title('RTP queue delay[s]')
ylim([0 maxD]);
xlim(Tlim);
subplot(K,1,L);L=L+1;
ce = a(:,13)+a(:,13+6)+a(:,13+12)+a(:,13+18);
loss = a(:,12)+a(:,12+6)+a(:,12+12)+a(:,12+18);
plot(T,ce/1e2,T,loss/1e2,T,filter(B,1,a(:,6))/1e3,'k');
set(gca,'FontSize',12);grid on;
set(gca,'XTickLabel',[]);
title('Tx rate [Mbps]')
legend('ce*10','loss*10','Total')
ylim([0 maxRT]);
xlim(Tlim);
subplot(K,1,L);L=L+1;
plot(T,filter(B,1,a(:,11))/1e3,T,filter(B,1,a(:,11+6))/1e3,T,filter(B,1,a(:,11+12))/1e3,T,filter(B,1,a(:,11+18))/1e3);
set(gca,'FontSize',12);grid on;
set(gca,'XTickLabel',[]);
title('Tx rate streams [Mbps]')
legend('0','1','2','3')
ylim([0 maxR]);
xlim(Tlim);
subplot(K,1,L);L=L+1;
plot(T,a(:,9)/1e3,'-',T,a(:,9+6)/1e3,'-',T,a(:,9+12)/1e3,'-',T,a(:,9+18)/1e3,'-');
set(gca,'FontSize',12);grid on;
set(gca,'XTickLabel',[]);
legend('0','1','2','3')
xlim(Tlim);
ylim([0 maxR]);
title('Target rate [Mbps]')
subplot(K,1,L);L=L+1;
plot(T,filter(B,1,a(:,10))/1e3,T,filter(B,1,a(:,10+6))/1e3,T,filter(B,1,a(:,10+12))/1e3,T,filter(B,1,a(:,10+18))/1e3);
set(gca,'FontSize',12);grid on;
legend('0','1','2','3')
title('Encoder rate [Mbps]')
xlim(Tlim);
ylim([0 maxR]);
xlabel('T [s]')
end