df <- read.table("../tmp/mean_execution_time.tsv", sep = "\t", header = T) lapply(df$model, function(model) { test_that(paste(model, ": RunModel should be as fast as CRAN version"), { sel <- df$model == model threshold <- max(0.2, -0.15 * df[sel, 2] + 1) # decrease from 1 at 0.1ms to 0.2 at 5.5ms expect_lt(df$evolution[sel], threshold) }) })