Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marios CHOUDARY (76978)
end2end-smkex
Commits
da176dc1
Commit
da176dc1
authored
Apr 07, 2022
by
Marius Scarlat
Browse files
Create plot using measured data for Android
parent
d88a2dc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
measurements/new_measurements/measurements.txt
→
measurements/new_measurements/
android_
measurements.txt
View file @
da176dc1
File moved
measurements/new_measurements/android_rtt_results.png
0 → 100644
View file @
da176dc1
34.6 KB
measurements/new_measurements/plot.py
0 → 100644
View file @
da176dc1
import
matplotlib.pyplot
as
plt
import
statistics
as
stats
## Results ##
list_roundtrip_smkex_dis_cellular
=
[
208794
,
901752
,
659634
,
256330
,
667944
,
526059
,
571395
,
668581
,
196097
,
292158
,
109012
,
570819
,
805302
,
1088009
,
443475
]
list_roundtrip_smkex_dis_wifi
=
[
227243
,
414755
,
358590
,
372588
,
160781
,
395713
,
493785
,
548092
,
391679
,
308903
,
397528
,
270654
,
245505
,
433441
,
526341
]
list_roundtrip_smkex_en_cellular
=
[
2245543
,
2465127
,
1962821
,
1736246
,
2380153
,
2300406
,
1627398
,
1877671
,
1906431
,
1998328
,
2102725
,
2267787
,
1543823
,
2004747
,
1823623
]
list_roundtrip_smkex_en_wifi
=
[
870372
,
1073633
,
1242067
,
901262
,
1200529
,
1107017
,
842459
,
1126040
,
832922
,
877184
,
958729
,
860566
,
1259220
,
1138951
,
1247817
]
list_roundtrip_smkex_en_wifi_and_cellular
=
[
1256678
,
1488999
,
1744047
,
1460131
,
1395387
,
1383710
,
1453217
,
1694845
,
1449557
,
1318066
,
1628004
,
1352815
,
1167930
,
1384792
,
1543504
]
## Calculate mean ##
mean_smkex_dis_cellular
=
int
(
stats
.
mean
(
list_roundtrip_smkex_dis_cellular
)
/
1000
)
mean_smkex_dis_wifi
=
int
(
stats
.
mean
(
list_roundtrip_smkex_dis_wifi
)
/
1000
)
mean_smkex_en_cellular
=
int
(
stats
.
mean
(
list_roundtrip_smkex_en_cellular
)
/
1000
)
mean_smkex_en_wifi
=
int
(
stats
.
mean
(
list_roundtrip_smkex_en_wifi
)
/
1000
)
mean_smkex_en_wifi_and_cellular
=
int
(
stats
.
mean
(
list_roundtrip_smkex_en_wifi_and_cellular
)
/
1000
)
## Calculate standard deviation ##
standard_dev_smkex_dis_cellular
=
int
(
stats
.
stdev
(
list_roundtrip_smkex_dis_cellular
)
/
1000
)
standard_dev_smkex_dis_wifi
=
int
(
stats
.
stdev
(
list_roundtrip_smkex_dis_wifi
)
/
1000
)
standard_dev_smkex_en_cellular
=
int
(
stats
.
stdev
(
list_roundtrip_smkex_en_cellular
)
/
1000
)
standard_dev_smkex_en_wifi
=
int
(
stats
.
stdev
(
list_roundtrip_smkex_en_wifi
)
/
1000
)
standard_dev_smkex_en_wifi_and_cellular
=
int
(
stats
.
stdev
(
list_roundtrip_smkex_en_wifi_and_cellular
)
/
1000
)
print
(
"[WIFI enabled and SMKEX disabled]: Mean=%d ; Standard Deviation=%d"
%
(
mean_smkex_dis_wifi
,
standard_dev_smkex_dis_wifi
))
print
(
"[WIFI enabled and SMKEX enabled]: Mean=%d ; Standard Deviation=%d"
%
(
mean_smkex_en_wifi
,
standard_dev_smkex_en_wifi
))
print
(
"[Cellular enabled and SMKEX disabled]: Mean=%d; Standard Deviation=%d"
%
(
mean_smkex_dis_cellular
,
standard_dev_smkex_dis_cellular
))
print
(
"[Cellular enabled and SMKEX enabled]: Mean=%d ; Standard Deviation=%d"
%
(
mean_smkex_en_cellular
,
standard_dev_smkex_en_cellular
))
print
(
"[Cellular & Wifi enabled and SMKEX enabled]: Mean=%d ; Standard Deviation=%d"
%
(
mean_smkex_en_wifi_and_cellular
,
standard_dev_smkex_en_wifi_and_cellular
))
X
=
[
'SIP Plain
\n
via Mobile Data'
,
'SIP Plain
\n
via Wifi'
,
'SIP with SMKEX
\n
Enabled via Mobile Data'
,
'SIP with SMKEX
\n
Enabled via Wifi'
,
'SIP with SMKEX
\n
Enabled via Wifi and Mobile Data'
]
Y
=
[
mean_smkex_dis_cellular
,
mean_smkex_dis_wifi
,
mean_smkex_en_cellular
,
mean_smkex_en_wifi
,
mean_smkex_en_wifi_and_cellular
]
Yerr
=
[
standard_dev_smkex_dis_cellular
,
standard_dev_smkex_dis_wifi
,
standard_dev_smkex_en_cellular
,
standard_dev_smkex_en_wifi
,
standard_dev_smkex_en_wifi_and_cellular
]
plt
.
bar
(
X
,
Y
,
color
=
[
'#009933'
,
'#99ffd6'
,
'#cc0000'
,
'#0066ff'
,
'#ff471a'
])
plt
.
errorbar
(
x
=
X
,
y
=
Y
,
yerr
=
Yerr
,
fmt
=
'o'
,
ecolor
=
'black'
,
color
=
'black'
,
capsize
=
4
,
capthick
=
2
)
# plt.title('Android SIP Message Roundtrip', fontsize=18)
plt
.
ylabel
(
'Average time for transmission [ms]'
,
fontsize
=
14
)
plt
.
show
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment