Skip to content

Commit

Permalink
removed microbenchmark code lines in test and dependencies. the time …
Browse files Browse the repository at this point in the history
…was still less than 0.25 seconds in the logs so lowered to 0.25
  • Loading branch information
mzayeddfe committed Nov 1, 2024
1 parent 06ed43e commit 8cfc6df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Imports:
withr
Suggests:
knitr,
microbenchmark,
readxl,
rmarkdown,
spelling,
Expand Down
9 changes: 2 additions & 7 deletions tests/testthat/test-z_replace.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,10 @@ end_time <- Sys.time()
test_time <- difftime(end_time, start_time, units = "secs")

# calculating the time it takes
test_time <- summary(microbenchmark::microbenchmark(z_replace(df),
unit = "seconds", times = 100
))$max

print(test_time)

# testing that the speed is less than 1 second
# testing that the speed is less than 0.25 second
test_that("Speed of the function", {
expect_equal(test_time < 1, TRUE)
expect_equal(test_time < 0.25, TRUE)
})

# Check error message for empty data frame
Expand Down

0 comments on commit 8cfc6df

Please sign in to comment.