diff --git a/.ci/atime/bisect-7687.sh b/.ci/atime/bisect-7687.sh new file mode 100644 index 0000000000..3c0fbe9aab --- /dev/null +++ b/.ci/atime/bisect-7687.sh @@ -0,0 +1,6 @@ +## git bisect old=equal perf, new=divergent. +cp tests.R ~/tests.R +git bisect start +git bisect old 90f1c1e7b4811ceaef4848a2805a2295d9e5c5f2 +git bisect new master +git bisect run bash ~/R/data.table/.ci/atime/run-7687.sh diff --git a/.ci/atime/run-7687-ratios.R b/.ci/atime/run-7687-ratios.R new file mode 100644 index 0000000000..95c300c496 --- /dev/null +++ b/.ci/atime/run-7687-ratios.R @@ -0,0 +1,13 @@ +library(data.table) +tres <- readRDS("run-7687.rds") +tref <- atime::references_best(tres) +plot(tref) +dcast( + tref$meas, N + unit ~ expr.name, value.var="empirical" +)[, ratio := HEAD/Before][, inverse := 1/ratio][!is.na(ratio)][N==max(N)] +tpred <- predict(tref, seconds=1, kilobytes=1e4) +tpred <- predict(tref, seconds=1, kilobytes=2e4) +plot(tpred) +dcast( + tpred$prediction, unit ~ expr.name, value.var="N" +)[, ratio := Before/HEAD][, inverse := 1/ratio][] diff --git a/.ci/atime/run-7687.R b/.ci/atime/run-7687.R new file mode 100644 index 0000000000..c2aff8e7a8 --- /dev/null +++ b/.ci/atime/run-7687.R @@ -0,0 +1,18 @@ +tinfo <- atime::atime_pkg_test_info("~/R/data.table") +names(tinfo$test.call) +tname <- "DT[by] fixed in #4558" +tcall <- tinfo$test.call[[tname]] +hist.sha.list <- as.list(tcall[c("Before", "Regression", "Fixed")]) +pr.sha.list <- tcall$sha.vec +HEAD <- grep("HEAD", names(pr.sha.list), value=TRUE) +tcall[c("Before", "Regression", "Fixed")] <- NULL +tcall$sha.vec <- c(hist.sha.list, pr.sha.list)[c(HEAD, "Before")] +names(tcall$sha.vec) <- c("HEAD","Before") +##tcall$seconds.limit <- 1 +tres <- eval(tcall) +saveRDS(tres, "run-7687.rds") +library(data.table) +print(meas_wide <- dcast( + tres$meas, N ~ expr.name, value.var="kilobytes" +)[, ratio := HEAD/Before][max(which(!is.na(ratio)))]) +q(status=ifelse(meas_wide$ratio>1.4, 1, 0)) diff --git a/.ci/atime/run-7687.sh b/.ci/atime/run-7687.sh new file mode 100644 index 0000000000..92946ba7c0 --- /dev/null +++ b/.ci/atime/run-7687.sh @@ -0,0 +1,5 @@ +ATIME=~/R/data.table/.ci/atime +mkdir -p $ATIME +cp ~/tests.R $ATIME/tests.R +Rscript $ATIME/run-7687.R +