diff --git a/harness.R b/harness.R new file mode 100644 index 0000000000000000000000000000000000000000..7a9a464a750245e4b4d27d270380ea9af4d1a56c --- /dev/null +++ b/harness.R @@ -0,0 +1,24 @@ +arg <- commandArgs(TRUE) +if (length(arg) < 2) { + stop("args") +} + +conf <- arg[[1]] +sm <- as.integer(arg[[2]]) + +sys <- ifelse(R.Version()$major == 2L, "Renjin", "GNU R") + +log.result <- function(...) { + con <- file("results.tsv", open="at") + writeLines(paste(c(...), collapse="\t"), con=con) + close(con) +} + + +clearResultRecycler <- function() { + if (sys == "Renjin") { + import(org.renjin.compiler.pipeline.optimize.AggregationRecycler)$clear() + print("cleaned aggregation cache") + } +} +