Repository navigation
Expand file tree
/
Copy pathplot_thp_delay.m
More file actions
66 lines (57 loc) · 1.66 KB
/
Copy pathplot_thp_delay.m
File metadata and controls
66 lines (57 loc) · 1.66 KB
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
function plot_thp_delay(a,id,Tlim,maxThp,maxDelay,maxC)
% This function plots the thorughput
% RTT and estimated queue delay
% Parameters:
% a : log file from SCReAM BW test tool
% imported with the command
% a = load(<logfile>);
% where <logfile> is the name of the log file
% id : stream id
% Tlim : xmin and xmax limits [s], e.g. [0 100]
% maxThp : Max thorughput [Mbps]
% maxDelay : Max delay [s]
%
% The script can be used with matlab or octave
%
ix = find(a(:,8)==id);
T = a(ix,1);
T = T-T(1);
subplot(5,1,1);
plot(T,filter(1,1,a(ix,13))/1e6,T,a(ix,12)/1e6,T,a(ix,14)/1e6,T,a(ix,18)/1e6,T,min(maxThp/10,a(ix,15)/1e3-1),'.k');
set(gca,'FontSize',12);grid on;
set(gca,'XTickLabel',[]);grid on;
title('Throughput [Mbps]');
legend('Transmitted','RTP','ACKed','Target','Loss')
xlim(Tlim);
ylim([0 maxThp]);
subplot(5,1,2);
plot(T,a(ix,5)/1e3,'-r',T,a(ix,4)/1e3,'.-b',T,a(ix,20)/1e3,'k');
set(gca,'FontSize',12);grid on;
set(gca,'XTickLabel',[]);grid on;
title('CWND(B) and bytes in flight(R) [kByte]');
xlim(Tlim);
ylim([0 maxC]);
subplot(5,1,3);
x = a(ix,11)./a(ix,10)*100;
plot(T,x,T,a(ix,21)*100);
mean(x)
set(gca,'FontSize',12);grid on;
set(gca,'XTickLabel',[]);grid on;
title('Congestion mark [%]');
xlim(Tlim);
ylim([0 110]);
subplot(5,1,4);
plot(T,a(ix,2),'.-',T,a(ix,19),'.-','linewidth',1);ylim([0 maxDelay]);
set(gca,'FontSize',12);grid on;
title('Network queue(B) and RTP queue(R) [s]');
xlim(Tlim);
subplot(5,1,5);
plot(T,a(ix,3),'.-','linewidth',1);ylim([0 maxDelay]);
set(gca,'FontSize',12);grid on;
set(gca,'XTickLabel',[]);grid on;
title('RTT [s]');
xlim(Tlim);
xlabel('T [s]');
xlim(Tlim);
mean(a(ix,18)/1e6)
end