mirror of
https://github.com/codex-storage/bittorrent-benchmarks.git
synced 2025-02-19 06:26:26 +00:00
feat: add confidence interval to table; add IQR to plot
This commit is contained in:
parent
61f2172304
commit
5cba77eb99
@ -141,11 +141,18 @@ completion_time_stats <- function(download_times, meta) {
|
||||
p05 = quantile(completion_times, p = 0.05),
|
||||
p10 = quantile(completion_times, p = 0.10),
|
||||
p20 = quantile(completion_times, p = 0.20),
|
||||
p25 = quantile(completion_times, p = 0.25),
|
||||
median = median(completion_times),
|
||||
p75 = quantile(completion_times, p = 0.75),
|
||||
p80 = quantile(completion_times, p = 0.80),
|
||||
p90 = quantile(completion_times, p = 0.90),
|
||||
p95 = quantile(completion_times, p = 0.95),
|
||||
max = max(completion_times),
|
||||
iqr = p75 - p25,
|
||||
# This gives us roughly a 95% ci for comparing medians.
|
||||
ci = (1.58 * iqr) / sqrt(n),
|
||||
w_top = median + ci,
|
||||
w_bottom = median - ci
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,10 @@ We then plot the median by network size, and facet it by seeder ratio and file s
|
||||
|
||||
```{r fig.width = 10, warning=FALSE, message=FALSE}
|
||||
ggplot(benchmarks) +
|
||||
geom_ribbon(aes(ymin = p25, ymax = p75, x = network_size),
|
||||
fill = scales::alpha('blue', 0.5), col = 'lightgray') +
|
||||
geom_point(aes(x = network_size, y = p25), col = 'darkgray', size=10.0, shape='-') +
|
||||
geom_point(aes(x = network_size, y = p75), col = 'darkgray', size=10.0, shape='-') +
|
||||
geom_line(aes(x = network_size, y = median)) +
|
||||
geom_point(aes(x = network_size, y = median)) +
|
||||
ylab('median download time (seconds)') +
|
||||
|
Loading…
x
Reference in New Issue
Block a user