From 3d290ea4197c61ecb57612868013cb2c6f2173ef Mon Sep 17 00:00:00 2001 From: jangorecki Date: Thu, 14 Jun 2018 21:42:35 +0200 Subject: [PATCH] plot memory usage, closes #9 --- benchplot.R | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/benchplot.R b/benchplot.R index 47497e19..e7adaf46 100644 --- a/benchplot.R +++ b/benchplot.R @@ -36,7 +36,20 @@ library(data.table) if (!capabilities()[["X11"]] && capabilities()[["cairo"]]) options(bitmapType="cairo") # fix for R compiled with-x=no with-cairo=yes benchplot = function(.nrow=Inf) { - res = fread("time.csv")[batch==max(batch)][task=="groupby"][, task:=NULL] + res = fread("time.csv")[batch==max(batch)] + if (FALSE) { + png("groupby-memtest.png", width=1080, height=720) + lattice::barchart( + mem_gb ~ run | + factor(question, levels=unique(question)) + + factor(in_rows, levels=rev(unique(in_rows)), labels=sapply(rev(unique(in_rows)), pretty_sci)), + data = res, group = paste(solution, version), + horizontal=FALSE, subset = task=="groupby", auto.key=TRUE, scales=list(relation="free"), + main = paste("Grouping Benchmark RSS memory usage - as of", format(as.POSIXct(res[1L, batch], origin="1970-01-01"), "%Y-%m-%d")), xlab = "run", ylab = "GB" + ) + dev.off() + } + res = res[task=="groupby"][, task:=NULL] if (!is.finite(.nrow)) { .nrow = res[, max(in_rows)] }