Skip to content

Commit db4a15b

Browse files
committed
..
1 parent 7f43da5 commit db4a15b

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.ci/atime/tests.R

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -286,22 +286,24 @@ test.list <- atime::atime_test_list(
286286
Slow = "548410d23dd74b625e8ea9aeb1a5d2e9dddd2927", # Parent of the first commit in the PR (https://github.com/Rdatatable/data.table/commit/548410d23dd74b625e8ea9aeb1a5d2e9dddd2927)
287287
Fast = "c0b32a60466bed0e63420ec105bc75c34590865e"), # Commit in the PR (https://github.com/Rdatatable/data.table/pull/7144/commits) that uses a much faster implementation
288288

289-
"tables() non-recursive performance in #2606" = atime::atime_test(
289+
"tables() !recursive refactor in #2606" = atime::atime_test(
290290
N = as.integer(10^seq(1, 4, by = 0.5)),
291291
setup = {
292-
for (i in 1:N) {
293-
assign(paste0("DT_perf_test_", i), data.table(a = 1))
294-
}
292+
test_env <- new.env()
293+
local({
294+
for (i in 1:N) {
295+
assign(paste0("dt_perf_test", i), data.table(a=1), envir = test_env)
296+
assign(paste0("vec_perf_test", i), 1, envir = test_env)
297+
}
298+
})
299+
test_env
295300
},
296301
expr = {
297-
if ("recursive" %in% names(formals(data.table::tables))) {
298-
data.table::tables(silent = TRUE, recursive = FALSE)
299-
} else {
300-
data.table::tables(silent = TRUE)
301-
}
302+
library(data.table)
303+
data.table::tables(env = test_env, silent = TRUE, index = TRUE);
304+
NULL
302305
},
303306
before = "7c59daaed1836db57747d92494b1ce96612bbf80", # Parent of the first commit in the PR (https://github.com/Rdatatable/data.table/commit/7c59daaed1836db57747d92494b1ce96612bbf80)
304307
after = "6fee38c89200e10dcc10a6f2057ab784f9a011e7"), # Commit in the PR (https://github.com/Rdatatable/data.table/pull/7141/commits)
305-
306308
tests=extra.test.list)
307309
# nolint end: undesirable_operator_linter.

0 commit comments

Comments
 (0)