Skip to content

Commit

Permalink
feat(benchmark): Swap to bench::mark() to capture memory also
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Apr 18, 2024
1 parent 6da2b35 commit 7cb2b7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data-raw/benchmark.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ if (identical(Sys.getenv("CI"), "true") && identical(Sys.getenv("BACKEND"), ""))
}

# Construct the list of benchmarks
update_snapshot_benchmark <- microbenchmark::microbenchmark(scdb_updates(conn, data_on_conn), times = 25) |>
update_snapshot_benchmark <- bench::mark(scdb_updates(conn, data_on_conn), iterations = 25) |>
tidyr::unnest(c(time, gc)) |>
dplyr::mutate(
"benchmark_function" = "update_snapshot()",
"database" = names(conns)[[1]],
Expand All @@ -145,7 +146,8 @@ if (identical(Sys.getenv("CI"), "true") && identical(Sys.getenv("BACKEND"), ""))
}

# Construct the list of benchmarks
update_snapshot_benchmark <- microbenchmark::microbenchmark(scdb_updates(conn, data), times = 5) |>
update_snapshot_benchmark <- bench::mark(scdb_updates(conn, data), iterations = 5) |>
tidyr::unnest(c(time, gc)) |>
dplyr::mutate(
"benchmark_function" = "update_snapshot() - complexity",
"database" = names(conns)[[1]],
Expand Down

0 comments on commit 7cb2b7d

Please sign in to comment.