-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstreams.Rmd
82 lines (62 loc) · 1.69 KB
/
streams.Rmd
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
78
79
80
---
title: "5 min. Zoom Test Trace: Streams"
date: "`r Sys.Date()`"
output:
html_document:
df_print: paged
params:
input_file: "streams.csv"
fig_path: "fig/"
---
```{R setup, include=FALSE}
source("setup.R")
knitr::opts_chunk$set(dev = c("png", "pdf"), fig.width = 9, fig.height = 4.5,
fig.align = "center", fig.keep = "high", fig.path = params$fig_path)
```
### Notes
**media_type:**
* v: video
* a: audio
* s: screen share
**stream_type:**
* m: media stream
* f: forward error correction stream
```{R import}
streams <- read_csv(params$input_file, comment = "#",
col_types = "nffcicinnnnnnnn", col_names = TRUE)
```
```{r}
streams %>% group_by(rtp_ssrc, ip_src, ip_dst, tp_src, tp_dst, media_type) %>%
summarize(substreams = n(), .groups = "drop")
```
# Totals
```{r totals}
totals <- list(
streams = nrow(streams),
pkts = sum(streams$pkts),
bytes = sum(streams$bytes)
)
totals %>% as_tibble_row()
```
# Overview
```{r overview}
streams %>%
group_by(media_type, stream_type) %>%
summarize(n = n(), pkts = sum(pkts), bytes = sum(bytes), .groups = 'drop')
```
```{r streams-stream-dur, fig.width = 2.6, fig.height = 2.0}
streams %>%
filter(stream_type == 'm') %>%
mutate(dur_min = (end_ts_s - start_ts_s) / 60) %>%
filter(dur_min > 0) %>%
ggplot(aes(x=dur_min, color=media_type)) +
scale_x_continuous(limits=c(0, 30), breaks=c(0, 5, 10, 15, 20, 25, 30)) +
labs(x="Stream Duration [min.]", y="CDF", color="Media Type") +
stat_ecdf() +
theme(
legend.title = element_blank(),
legend.position = c(0.9, 0.2),
legend.margin = margin(0, 0, 0, 0),
legend.spacing.x = unit(0, "mm"),
legend.spacing.y = unit(0, "mm"))
```