From 52ee21c6984204cf953d98526158a8fe89ee72a5 Mon Sep 17 00:00:00 2001 From: cmdoret Date: Thu, 26 Oct 2023 20:28:00 +0200 Subject: [PATCH] fix(bench): add stdev on viz --- scripts/viz_bench.R | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/viz_bench.R b/scripts/viz_bench.R index 123eb8d..1da6ec0 100644 --- a/scripts/viz_bench.R +++ b/scripts/viz_bench.R @@ -5,7 +5,7 @@ library(tidyverse) timings <- read_csv("timings.csv") -timings <- timings %>% +bench <- timings %>% rename( tool = command, thousand_lines = parameter_N, @@ -18,8 +18,17 @@ timings <- timings %>% select(tool, mean, fmt, stddev, thousand_lines) %>% arrange(thousand_lines, tool) -ggplot(timings, aes(x = thousand_lines, y = log10(mean), color = tool)) + +ggplot(bench, aes(x = thousand_lines, y = log10(mean), color = tool)) + geom_line() + + geom_ribbon( + aes( + y = log10(mean), + ymin = log10(mean - stddev), + ymax = log10(mean + stddev), + fill = "lightgrey" + ), + alpha = .2 + ) + xlab("Thousands of lines parsed") + ylab("Log10 time (seconds)") + theme_bw(base_size = 18) +