mirror of
https://github.com/codex-storage/bittorrent-benchmarks.git
synced 2025-01-24 09:58:57 +00:00
analysis notebook sketch
This commit is contained in:
parent
278007cdce
commit
2c17527954
5
analysis/collect-logs.sh
Executable file
5
analysis/collect-logs.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
kubectl logs --prefix -n codex-benchmarks -l app=deluge-nodes --tail=-1 > "${1}.log"
|
||||
grep '\[M' "${1}.log" | tr -s ' ' | cut -d ' ' -f1,7 | sed 's/ /,/' | grep -v 'metric' > "${1}.csv"
|
82
analysis/static-network-experiment.Rmd
Normal file
82
analysis/static-network-experiment.Rmd
Normal file
@ -0,0 +1,82 @@
|
||||
---
|
||||
title: "Static Network Experiment"
|
||||
output: html_notebook
|
||||
---
|
||||
|
||||
```{r}
|
||||
library(tidyverse)
|
||||
```
|
||||
|
||||
```{r}
|
||||
deluge <- read_csv(
|
||||
'./10-nodes-10-reps-4-seeders-2-seeder-sets-100MB.csv',
|
||||
col_names = c('node', 'metric', 'timestamp', 'dataset', 'piece'),
|
||||
show_col_types = FALSE
|
||||
) |>
|
||||
mutate(
|
||||
temp = str_remove(dataset, "<unknown>,dataset-"),
|
||||
seed_set = as.numeric(str_extract(temp, "^\\d+")),
|
||||
run = as.numeric(str_extract(temp, "\\d+$"))
|
||||
) |>
|
||||
select(-temp)
|
||||
```
|
||||
|
||||
|
||||
```{r}
|
||||
deluge <- deluge |>
|
||||
group_by(node, seed_set, run) |>
|
||||
arrange(timestamp) |>
|
||||
mutate(
|
||||
piece_index = seq_along(timestamp)
|
||||
) |>
|
||||
ungroup() |>
|
||||
mutate(completed = piece_index / max(piece))
|
||||
```
|
||||
|
||||
```{r}
|
||||
# Adds elapsed time
|
||||
deluge <- deluge |>
|
||||
group_by(dataset) |>
|
||||
mutate(
|
||||
start_time = min(timestamp),
|
||||
end_time = max(timestamp)
|
||||
) |>
|
||||
ungroup() |>
|
||||
mutate(elapsed = timestamp - start_time)
|
||||
```
|
||||
|
||||
```{r}
|
||||
deluge |> head()
|
||||
```
|
||||
|
||||
```{r}
|
||||
deluge |>
|
||||
group_by(node, seed_set, run) |>
|
||||
count() |>
|
||||
ungroup() |>
|
||||
filter(n != 400)
|
||||
```
|
||||
|
||||
```{r fig.width=10}
|
||||
ggplot(deluge |> ungroup()) +
|
||||
geom_line(aes(x=elapsed, y=completed, col=node), lwd=1) +
|
||||
theme_minimal() +
|
||||
facet_wrap(. ~ dataset, nrow = 4)
|
||||
```
|
||||
|
||||
Averages the time to the $n^{th}$ piece index, over all runs for a given seed set:
|
||||
|
||||
```{r}
|
||||
deluge_averaged <- deluge |>
|
||||
group_by(node, seed_set, piece_index) |>
|
||||
summarise(elapsed=mean(elapsed), .groups = 'drop')
|
||||
```
|
||||
|
||||
```{r fig.width=10, fig.height=5}
|
||||
ggplot(deluge_averaged) +
|
||||
geom_line(aes(x = elapsed, y = piece_index, col = node), lwd=1) +
|
||||
facet_wrap(. ~ seed_set) +
|
||||
theme_minimal()
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user