feat(graphs): new graph for bandwidth sweep
This commit is contained in:
+11
-1
@@ -41,7 +41,7 @@ CSVS := $(addprefix $(DERIVED)/, runs.csv rtts.csv idts.csv firstflow_bin
|
||||
PDFS := $(addprefix $(OUT)/, $(addsuffix .pdf, $(FIG_STEMS)))
|
||||
TEXS := $(addprefix $(OUT)/, $(addsuffix .tex, $(FIG_STEMS)))
|
||||
|
||||
.PHONY: all derive figures tikz sanity values pdfs tex clean datacenter-fq datacenter-fq-tikz direct-link direct-link-tikz slowstart slowstart-tikz all-experiments all-experiments-tikz
|
||||
.PHONY: all derive figures tikz sanity values pdfs tex clean datacenter-fq datacenter-fq-tikz direct-link direct-link-tikz slowstart slowstart-tikz bandwidths bandwidths-tikz all-experiments all-experiments-tikz
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
all: all-experiments
|
||||
@@ -175,6 +175,16 @@ direct-link:
|
||||
direct-link-tikz:
|
||||
$(MAKE) tex $(DIRECT_LINK_ARGS)
|
||||
|
||||
BANDWIDTHS_ARGS = EXP=bandwidths SETUP=bandwidths \
|
||||
SOLUTIONS="1:250 2:500 4:1000 8:2000" \
|
||||
FIG_STEMS="bandwidth_idt_cdf"
|
||||
|
||||
bandwidths:
|
||||
$(MAKE) pdfs $(BANDWIDTHS_ARGS)
|
||||
|
||||
bandwidths-tikz:
|
||||
$(MAKE) tex $(BANDWIDTHS_ARGS)
|
||||
|
||||
all-experiments: datacenter-fq direct-link slowstart
|
||||
all-experiments-tikz: datacenter-fq-tikz direct-link-tikz slowstart-tikz
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env Rscript
|
||||
source("common.R")
|
||||
|
||||
BW_LEVELS <- c("1", "2", "4", "8")
|
||||
|
||||
parser <- fig_parser(description = "Per-flow IDT CDF across aggregate bandwidths (TSO Pacing)")
|
||||
parser$add_argument("--sample", type = "integer", default = 20000,
|
||||
help = "downsample to N points per bandwidth (0 = none)")
|
||||
parser$add_argument("--seed", type = "integer", default = 1)
|
||||
args <- parser$parse_args()
|
||||
|
||||
set.seed(args$seed)
|
||||
idts <- read_csv(file.path(args$data, "idts.csv"), show_col_types = FALSE) %>%
|
||||
mutate(bw = factor(as.character(solution), levels = BW_LEVELS))
|
||||
if (args$sample > 0) {
|
||||
idts <- idts %>% group_by(bw) %>% slice_sample(n = args$sample) %>% ungroup()
|
||||
}
|
||||
|
||||
p <- ggplot(idts, aes(x = idt_us, colour = bw))
|
||||
p <- p + stat_ecdf(linewidth = 0.9, pad = FALSE, key_glyph = "rect")
|
||||
p <- p + scale_x_log10(labels = label_comma())
|
||||
p <- p + scale_y_continuous(labels = label_pct())
|
||||
p <- p + scale_colour_viridis_d(end = 0.9, name = "Aggregate (Gbps)")
|
||||
p <- p + labs(x = paste0("Inter-departure time within flow (", label_us(), ")"), y = "CDF")
|
||||
p <- p + theme_paper()
|
||||
p <- p + theme(legend.text = element_text(size = rel(0.8)), legend.key.size = unit(6, "pt"))
|
||||
|
||||
if (args$zoom) {
|
||||
p <- p + coord_cartesian(xlim = c(3, 1000), ylim = c(0.9, 1.0))
|
||||
}
|
||||
|
||||
save_figure(p, args)
|
||||
Reference in New Issue
Block a user