feat(graphs): new graph for flow sweep, also wired up the new data into all target
This commit is contained in:
+13
-3
@@ -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 bandwidths bandwidths-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 flows flows-tikz all-experiments all-experiments-tikz
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
all: all-experiments
|
||||
@@ -185,8 +185,18 @@ bandwidths:
|
||||
bandwidths-tikz:
|
||||
$(MAKE) tex $(BANDWIDTHS_ARGS)
|
||||
|
||||
all-experiments: datacenter-fq direct-link slowstart
|
||||
all-experiments-tikz: datacenter-fq-tikz direct-link-tikz slowstart-tikz
|
||||
FLOWS_ARGS = EXP=flows SETUP=flows \
|
||||
SOLUTIONS="2:2 4:4 8:8 16:16 30:30" \
|
||||
FIG_STEMS="flows_idt_cdf"
|
||||
|
||||
flows:
|
||||
$(MAKE) pdfs $(FLOWS_ARGS)
|
||||
|
||||
flows-tikz:
|
||||
$(MAKE) tex $(FLOWS_ARGS)
|
||||
|
||||
all-experiments: datacenter-fq direct-link slowstart bandwidths flows
|
||||
all-experiments-tikz: datacenter-fq-tikz direct-link-tikz slowstart-tikz bandwidths-tikz flows
|
||||
|
||||
# Slowstart: standalone, reads raw text files directly (no aggregator).
|
||||
SLOWSTART_OUT := ../out/slowstart
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env Rscript
|
||||
source("common.R")
|
||||
|
||||
FLOW_LEVELS <- c("2", "4", "8", "16", "30")
|
||||
|
||||
parser <- fig_parser(description = "Per-flow IDT CDF across flow counts (TSO Pacing)")
|
||||
parser$add_argument("--sample", type = "integer", default = 20000,
|
||||
help = "downsample to N points per flow count (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(nflows = factor(as.character(solution), levels = FLOW_LEVELS))
|
||||
if (args$sample > 0) {
|
||||
idts <- idts %>% group_by(nflows) %>% slice_sample(n = args$sample) %>% ungroup()
|
||||
}
|
||||
|
||||
p <- ggplot(idts, aes(x = idt_us, colour = nflows))
|
||||
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 = "Flows")
|
||||
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